Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2020-11-13 03:34:53 +0300
committerCampbell Barton <ideasman42@gmail.com>2020-11-13 03:36:29 +0300
commit2e08500d047e830ceeb651466cae0140d31fe9a4 (patch)
tree4fc9b8c2fafeb1a4b8e2e2082e7820620d042ca3
parentd59fa12f2ad5c57c68d63e476270fcd274b61062 (diff)
Fix memory leak writing PNG when opening the file fails
-rw-r--r--source/blender/imbuf/intern/png.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/source/blender/imbuf/intern/png.c b/source/blender/imbuf/intern/png.c
index dbae641f707..0104d7e2f17 100644
--- a/source/blender/imbuf/intern/png.c
+++ b/source/blender/imbuf/intern/png.c
@@ -406,6 +406,7 @@ int imb_savepng(struct ImBuf *ibuf, const char *filepath, int flags)
if (pixels16) {
MEM_freeN(pixels16);
}
+ MEM_freeN(row_pointers);
printf("imb_savepng: Cannot open file for writing: '%s'\n", filepath);
return 0;
}