aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs/Xserver/hw/nxagent/compext
diff options
context:
space:
mode:
authorMihai Moldovan <ionic@ionic.de>2018-07-07 08:04:51 +0200
committerMihai Moldovan <ionic@ionic.de>2018-07-07 08:05:24 +0200
commit992673157077080f3d5637c7f666e43639181a91 (patch)
tree4fea0a4dd680f6e9db068ec89ec575c0e8cfb765 /nx-X11/programs/Xserver/hw/nxagent/compext
parent15f69488dc712ac93714d17d2c4e88e09de187df (diff)
downloadnx-libs-992673157077080f3d5637c7f666e43639181a91.tar.gz
nx-libs-992673157077080f3d5637c7f666e43639181a91.tar.bz2
nx-libs-992673157077080f3d5637c7f666e43639181a91.zip
misc: fix more regressions and whitespace weirdness introduced in 913fcf1a74426725f14380dd5b34286a21c37ab7.
Diffstat (limited to 'nx-X11/programs/Xserver/hw/nxagent/compext')
-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;
}