]> mj.ucw.cz Git - libucw.git/commitdiff
Main: Plugged memory leaks of internal structures
authorMartin Mares <mj@ucw.cz>
Fri, 25 Feb 2011 23:26:22 +0000 (00:26 +0100)
committerMartin Mares <mj@ucw.cz>
Fri, 25 Feb 2011 23:26:22 +0000 (00:26 +0100)
ucw/mainloop.c

index 6575210b2665baf7fc5e2cc2cfd267e8d5218fe2..57fd4ff967d6bd526ae6713355c6c46c0d20476f 100644 (file)
@@ -86,9 +86,15 @@ main_delete(struct main_context *m)
   struct main_context *prev = main_switch_context(m);
 
   if (m->sigchld_handler)
-    signal_del(m->sigchld_handler);
+    {
+      signal_del(m->sigchld_handler);
+      xfree(m->sigchld_handler);
+    }
   if (m->sig_pipe_file)
-    file_del(m->sig_pipe_file);
+    {
+      file_del(m->sig_pipe_file);
+      xfree(m->sig_pipe_file);
+     }
   if (m->sig_pipe_recv >= 0)
     {
       close(m->sig_pipe_recv);