diff options
author | Glenn Randers-Pehrson <glennrp at users.sourceforge.net> | 2000-07-17 06:17:09 -0500 |
---|---|---|
committer | Glenn Randers-Pehrson <glennrp at users.sourceforge.net> | 2009-04-06 16:05:29 -0500 |
commit | 4766a244b23f951a64b7d7514f6b495debfa5a98 (patch) | |
tree | 6b0525ece9dd9d23b395da7e26e9adb786915a5f /example.c | |
parent | a4d54bdb4ab6b727e6b98b6990950f0864b1e067 (diff) |
Imported from libpng-1.0.8rc1.tar
Diffstat (limited to 'example.c')
-rw-r--r-- | example.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -755,11 +755,13 @@ void write_png(char *file_name /* , ... other image information ... */) allocated it with malloc() instead of png_malloc(), use free() instead of png_free(). */ png_free(png_ptr, palette); + palette=NULL; /* Similarly, if you png_malloced any data that you passed in with png_set_something(), such as a hist or trans array, free it here, when you can be sure that libpng is through with it. */ png_free(png_ptr, trans); + trans=NULL; /* clean up after the write, and free any memory allocated */ png_destroy_write_struct(&png_ptr, &info_ptr); |