fixed potential memory leak
This commit is contained in:
parent
17b21635a2
commit
ff9c68e247
1 changed files with 3 additions and 1 deletions
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in a new issue