From a08794d7cd03c680203216186bdf09a88479684d Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Mon, 13 Apr 2009 12:36:23 +0200 Subject: [PATCH] client, wibox: unref image on garbage collection Signed-off-by: Julien Danjou --- client.c | 1 + wibox.c | 1 + 2 files changed, 2 insertions(+) diff --git a/client.c b/client.c index 177f6ac0..e61ccaf6 100644 --- a/client.c +++ b/client.c @@ -53,6 +53,7 @@ luaA_client_gc(lua_State *L) { client_t *c = luaL_checkudata(L, 1, "client"); button_array_wipe(&c->buttons); + image_unref(L, c->icon); p_delete(&c->class); p_delete(&c->instance); p_delete(&c->icon_name); diff --git a/wibox.c b/wibox.c index 22e5ea6d..97ac3e00 100644 --- a/wibox.c +++ b/wibox.c @@ -40,6 +40,7 @@ luaA_wibox_gc(lua_State *L) wibox_t *wibox = luaL_checkudata(L, 1, "wibox"); simplewindow_wipe(&wibox->sw); button_array_wipe(&wibox->buttons); + image_unref(L, wibox->bg_image); luaL_unref(L, LUA_REGISTRYINDEX, wibox->widgets_table); luaL_unref(L, LUA_REGISTRYINDEX, wibox->mouse_enter); luaL_unref(L, LUA_REGISTRYINDEX, wibox->mouse_leave);