From ff9c68e247704bd1522ea7a2055b7fa4b2b0c568 Mon Sep 17 00:00:00 2001 From: Mathias Gumz Date: Sun, 16 May 2010 14:25:59 +0200 Subject: fixed potential memory leak --- src/FbTk/Shape.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/FbTk/Shape.cc b/src/FbTk/Shape.cc index 91ecffc..c0489ec 100644 --- a/src/FbTk/Shape.cc +++ b/src/FbTk/Shape.cc @@ -77,8 +77,10 @@ Pixmap makePixmap(FbWindow &drawable, const unsigned char rows[]) { data, 8, 8, 32, 0); - if (ximage == 0) + if (ximage == 0) { + free(data); return 0; + } XInitImage(ximage); -- cgit v0.11.2