diff options
author | Ulrich Sibiller <uli42@gmx.de> | 2020-10-02 21:31:58 +0200 |
---|---|---|
committer | Ulrich Sibiller <uli42@gmx.de> | 2020-11-03 19:53:07 +0100 |
commit | 447ee15707c022b6fd9061ce0df3a960fe24fb80 (patch) | |
tree | cf4756ebfaf8172e5fc76762440459b1ea5a786c /nx-X11/programs/Xserver/hw/nxagent/compext/Png.c | |
parent | edb5a918a8a79262ce0bfd3924f6a5bb268877cd (diff) | |
download | nx-libs-447ee15707c022b6fd9061ce0df3a960fe24fb80.tar.gz nx-libs-447ee15707c022b6fd9061ce0df3a960fe24fb80.tar.bz2 nx-libs-447ee15707c022b6fd9061ce0df3a960fe24fb80.zip |
Compext.c: use SAFE_free macro
Diffstat (limited to 'nx-X11/programs/Xserver/hw/nxagent/compext/Png.c')
-rw-r--r-- | nx-X11/programs/Xserver/hw/nxagent/compext/Png.c | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/compext/Png.c b/nx-X11/programs/Xserver/hw/nxagent/compext/Png.c index 5c3a27612..00f6769f8 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/compext/Png.c +++ b/nx-X11/programs/Xserver/hw/nxagent/compext/Png.c @@ -34,6 +34,8 @@ #include "Mask.h" #include "Png.h" +#include "../Utils.h" + #define PANIC #define WARNING #undef TEST @@ -361,7 +363,7 @@ char *PngCompressData(XImage *image, int *compressed_size) #endif png_destroy_write_struct(&png_ptr, &info_ptr); - free(pngCompBuf); + SAFE_free(pngCompBuf); return NULL; } @@ -373,7 +375,7 @@ char *PngCompressData(XImage *image, int *compressed_size) fprintf(stderr, "******PngCompressData: PANIC! Could not alloc image_index.\n"); #endif - free(pngCompBuf); + SAFE_free(pngCompBuf); return NULL; } @@ -475,8 +477,8 @@ char *PngCompressData(XImage *image, int *compressed_size) png_destroy_write_struct(&png_ptr, &info_ptr); - free(pngCompBuf); - free(image_index); + SAFE_free(pngCompBuf); + SAFE_free(image_index); return NULL; } @@ -500,8 +502,8 @@ char *PngCompressData(XImage *image, int *compressed_size) (int) (count * sizeof(CARD8))); #endif - free(pngCompBuf); - free(image_index); + SAFE_free(pngCompBuf); + SAFE_free(image_index); return NULL; } @@ -532,8 +534,8 @@ char *PngCompressData(XImage *image, int *compressed_size) dy, h); #endif - free(srcBuf); srcBuf = NULL; - free(image_index); image_index = NULL; + SAFE_free(srcBuf); + SAFE_free(image_index); if (setjmp(png_jmpbuf(png_ptr))) { @@ -543,7 +545,7 @@ char *PngCompressData(XImage *image, int *compressed_size) png_destroy_write_struct(&png_ptr, &info_ptr); - free(pngCompBuf); + SAFE_free(pngCompBuf); return NULL; } @@ -594,7 +596,7 @@ char *PngCompressData(XImage *image, int *compressed_size) pngDataLen); #endif - free(pngCompBuf); + SAFE_free(pngCompBuf); return NULL; } |