Fixed memory leak by adding Xfree

Reviewed-by: Ander Conselvan de Oliveira <ander.conselvan-de-olive...@nokia.com>
Signed-off-by: Erkki Seppälä <erkki.sepp...@vincit.fi>
---
 src/ImUtil.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/src/ImUtil.c b/src/ImUtil.c
index cd418d8..3164d43 100644
--- a/src/ImUtil.c
+++ b/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;
-- 
1.7.0.4

_______________________________________________
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to