Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(381)

Unified Diff: third_party/libtiff/0010-fix-leak-imagebegin.patch

Issue 2545723004: Fix a leak when TIFFRGBAImageBegin fails (Closed)
Patch Set: Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/libtiff/README.pdfium » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/libtiff/0010-fix-leak-imagebegin.patch
diff --git a/third_party/libtiff/0010-fix-leak-imagebegin.patch b/third_party/libtiff/0010-fix-leak-imagebegin.patch
new file mode 100644
index 0000000000000000000000000000000000000000..41aaf91a38533cde468cb43ef5199d7f4137868e
--- /dev/null
+++ b/third_party/libtiff/0010-fix-leak-imagebegin.patch
@@ -0,0 +1,15 @@
+diff --git a/third_party/libtiff/tif_getimage.c b/third_party/libtiff/tif_getimage.c
+index 8523793..97fa94d 100644
+--- a/third_party/libtiff/tif_getimage.c
++++ b/third_party/libtiff/tif_getimage.c
+@@ -478,10 +478,7 @@ TIFFRGBAImageBegin(TIFFRGBAImage* img, TIFF* tif, int stop, char emsg[1024])
+ return 1;
+
+ fail_return:
+- _TIFFfree( img->redcmap );
+- _TIFFfree( img->greencmap );
+- _TIFFfree( img->bluecmap );
+- img->redcmap = img->greencmap = img->bluecmap = NULL;
++ TIFFRGBAImageEnd(img);
+ return 0;
+ }
« no previous file with comments | « no previous file | third_party/libtiff/README.pdfium » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698