fix memory leak on icon get
This commit is contained in:
parent
d25d5b921f
commit
36e9e07f84
|
@ -77,6 +77,8 @@ netwmicon_draw(Widget *widget, DrawCtx *ctx, int offset,
|
|||
widget->location, 0,
|
||||
icon->width, icon->height,
|
||||
widget->statusbar->height, icon->image);
|
||||
|
||||
p_delete(&icon->image);
|
||||
p_delete(&icon);
|
||||
|
||||
return widget->width;
|
||||
|
|
|
@ -98,6 +98,7 @@ tasklist_draw(Widget *widget, DrawCtx *ctx, int offset, int used)
|
|||
widget->location + box_width * i, 0,
|
||||
icon->width, icon->height,
|
||||
widget->statusbar->height, icon->image);
|
||||
p_delete(&icon->image);
|
||||
p_delete(&icon);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue