]> git.sur5r.net Git - i3/i3/commitdiff
Cleanup some Memory Leaks
authorAxel Wagner <mail@merovius.de>
Wed, 4 Aug 2010 02:07:16 +0000 (04:07 +0200)
committerAxel Wagner <mail@merovius.de>
Wed, 4 Aug 2010 02:07:16 +0000 (04:07 +0200)
i3bar/src/ipc.c
i3bar/src/main.c
i3bar/src/xcb.c

index 80ada5219d8b0369b02c6a9668a2d94369b4023a..bf91420e275cada9c55a9fecf1f4991038b56834 100644 (file)
@@ -144,6 +144,7 @@ void got_data(struct ev_loop *loop, ev_io *watcher, int events) {
         reply_handlers[type](buffer);
     }
 
+    FREE(header);
     FREE(buffer);
 }
 
index 3bd2183edc5d22180f1b35d54b8ba7c117f6528d..ab362d5cd9cb17cc3588d664275a12d34055f588 100644 (file)
@@ -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();
index 6b16b45f0841d63cef277a46d56e182e8d4bef11..eff74ac4f87fa410f2157a8247ba1ebdc57de66b 100644 (file)
@@ -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();
 }