From: Axel Wagner Date: Wed, 4 Aug 2010 02:07:16 +0000 (+0200) Subject: Cleanup some Memory Leaks X-Git-Tag: 4.0.1~7^2~95 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=51d466c41cda43551fab04831ea205d5926277e7;p=i3%2Fi3 Cleanup some Memory Leaks --- diff --git a/i3bar/src/ipc.c b/i3bar/src/ipc.c index 80ada521..bf91420e 100644 --- a/i3bar/src/ipc.c +++ b/i3bar/src/ipc.c @@ -144,6 +144,7 @@ void got_data(struct ev_loop *loop, ev_io *watcher, int events) { reply_handlers[type](buffer); } + FREE(header); FREE(buffer); } diff --git a/i3bar/src/main.c b/i3bar/src/main.c index 3bd2183e..ab362d5c 100644 --- a/i3bar/src/main.c +++ b/i3bar/src/main.c @@ -158,8 +158,15 @@ int main(int argc, char **argv) { ev_prepare_stop(main_loop, ev_prep); ev_check_stop(main_loop, ev_chk); + ev_io_stop(main_loop, xcb_io); + ev_io_stop(main_loop, child_io); + + FREE(xcb_io); FREE(ev_prep); FREE(ev_chk); + free(child_io); + + FREE(statusline); ev_default_destroy(); clean_xcb(); diff --git a/i3bar/src/xcb.c b/i3bar/src/xcb.c index 6b16b45f..eff74ac4 100644 --- a/i3bar/src/xcb.c +++ b/i3bar/src/xcb.c @@ -147,9 +147,9 @@ void init_xcb() { cookie, NULL); font_height = reply->font_ascent + reply->font_descent; + FREE(reply); printf("Calculated Font-height: %d\n", font_height); - /* FIXME: Maybe we can push that further backwards */ get_atoms(); }