[Bf-blender-cvs] [2e08500d047] blender-v2.91-release: Fix memory leak writing PNG when opening the file fails
Campbell Barton
noreply at git.blender.org
Fri Nov 13 01:36:58 CET 2020
Commit: 2e08500d047e830ceeb651466cae0140d31fe9a4
Author: Campbell Barton
Date: Fri Nov 13 11:34:53 2020 +1100
Branches: blender-v2.91-release
https://developer.blender.org/rB2e08500d047e830ceeb651466cae0140d31fe9a4
Fix memory leak writing PNG when opening the file fails
===================================================================
M source/blender/imbuf/intern/png.c
===================================================================
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;
}
More information about the Bf-blender-cvs
mailing list