aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs/Xserver/hw/nxagent/compext/Png.c
diff options
context:
space:
mode:
Diffstat (limited to 'nx-X11/programs/Xserver/hw/nxagent/compext/Png.c')
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/compext/Png.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/compext/Png.c b/nx-X11/programs/Xserver/hw/nxagent/compext/Png.c
index 91412baa1..0a258c5a3 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/compext/Png.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/compext/Png.c
@@ -330,6 +330,7 @@ char *PngCompressData(XImage *image, int *compressed_size)
png_destroy_write_struct(&png_ptr, NULL);
free(image_index);
+
return NULL;
}
@@ -340,8 +341,8 @@ char *PngCompressData(XImage *image, int *compressed_size)
#endif
png_destroy_write_struct(&png_ptr, &info_ptr);
-
free(image_index);
+
return NULL;
}
@@ -364,6 +365,7 @@ char *PngCompressData(XImage *image, int *compressed_size)
#endif
free(image_index);
+
return NULL;
}
@@ -376,8 +378,8 @@ char *PngCompressData(XImage *image, int *compressed_size)
#endif
png_destroy_write_struct(&png_ptr, &info_ptr);
-
free(pngCompBuf);
+
return NULL;
}
@@ -474,6 +476,7 @@ char *PngCompressData(XImage *image, int *compressed_size)
free(pngCompBuf);
free(image_index);
+
return NULL;
}
@@ -487,7 +490,9 @@ char *PngCompressData(XImage *image, int *compressed_size)
fprintf(stderr, "******PngCompressData: PANIC! Cannot allocate [%d] bytes.\n",
(int) (w * sizeof(CARD8)));
#endif
+
free(image_index);
+
return NULL;
}
@@ -520,6 +525,7 @@ char *PngCompressData(XImage *image, int *compressed_size)
free(pngCompBuf);
free(image_index);
+
return NULL;
}