fixed potential memory leak

This commit is contained in:
Mathias Gumz 2010-05-16 14:25:59 +02:00
parent 17b21635a2
commit ff9c68e247

View file

@ -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);