diff options
author | Campbell Barton <ideasman42@gmail.com> | 2020-11-13 03:34:53 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2020-11-13 03:36:29 +0300 |
commit | 2e08500d047e830ceeb651466cae0140d31fe9a4 (patch) | |
tree | 4fc9b8c2fafeb1a4b8e2e2082e7820620d042ca3 /source/blender/imbuf | |
parent | d59fa12f2ad5c57c68d63e476270fcd274b61062 (diff) |
Fix memory leak writing PNG when opening the file fails
Diffstat (limited to 'source/blender/imbuf')
-rw-r--r-- | source/blender/imbuf/intern/png.c | 1 |
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; } |