diff options
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; } |