forked from jengelh/wxWidgets-3_2
24 lines
603 B
Diff
24 lines
603 B
Diff
From ed141286a37f6e5ddafb5069347ff5d587e7a4e0 Mon Sep 17 00:00:00 2001
|
|
From: Su_Laus <sulau@freenet.de>
|
|
Date: Fri, 8 Aug 2025 21:35:30 +0200
|
|
Subject: [PATCH] tiffcmp: fix memory leak when second file cannot be opened.
|
|
|
|
Closes #728, #729
|
|
---
|
|
tools/tiffcmp.c | 3 +++
|
|
1 file changed, 3 insertions(+)
|
|
|
|
--- a/src/tiff/tools/tiffcmp.c
|
|
+++ b/src/tiff/tools/tiffcmp.c
|
|
@@ -108,7 +108,10 @@
|
|
return (2);
|
|
tif2 = TIFFOpen(argv[optind+1], "r");
|
|
if (tif2 == NULL)
|
|
+ {
|
|
+ TIFFClose(tif1);
|
|
return (2);
|
|
+ }
|
|
dirnum = 0;
|
|
while (tiffcmp(tif1, tif2)) {
|
|
if (!TIFFReadDirectory(tif1)) {
|