fix memory leak on icon get

This commit is contained in:
Julien Danjou 2008-01-04 15:59:17 +01:00
parent d25d5b921f
commit 36e9e07f84
2 changed files with 3 additions and 0 deletions

View File

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

View File

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