aboutsummaryrefslogtreecommitdiff
path: root/libX11/src/ImUtil.c
diff options
context:
space:
mode:
Diffstat (limited to 'libX11/src/ImUtil.c')
-rw-r--r--libX11/src/ImUtil.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/libX11/src/ImUtil.c b/libX11/src/ImUtil.c
index cd418d885..3164d43b7 100644
--- a/libX11/src/ImUtil.c
+++ b/libX11/src/ImUtil.c
@@ -372,6 +372,7 @@ XImage *XCreateImage (
if (image_bytes_per_line == 0) {
image->bytes_per_line = min_bytes_per_line;
} else if (image_bytes_per_line < min_bytes_per_line) {
+ Xfree(image);
return NULL;
} else {
image->bytes_per_line = image_bytes_per_line;