Check for NULL pointer in _TIFFfree().

PartitionAlloc does not handle free(NULL), so _TIFFfree() needs to do
the check, just like png_free_default() and _cmsFree() for other third
party code.

BUG=chromium:780709

Change-Id: I4e2ff0ba642c66e4a73e151c9ab42ebb42d34a5b
Reviewed-on: https://pdfium-review.googlesource.com/17791
Reviewed-by: Chris Palmer <palmer@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
diff --git a/core/fxcodec/codec/ccodec_tiffmodule.cpp b/core/fxcodec/codec/ccodec_tiffmodule.cpp
index 0fcd9f3..a5b70c6 100644
--- a/core/fxcodec/codec/ccodec_tiffmodule.cpp
+++ b/core/fxcodec/codec/ccodec_tiffmodule.cpp
@@ -73,7 +73,8 @@
 }
 
 void _TIFFfree(void* ptr) {
-  FXMEM_DefaultFree(ptr, 0);
+  if (ptr)
+    FXMEM_DefaultFree(ptr, 0);
 }
 
 void* _TIFFrealloc(void* ptr, tmsize_t size) {