daemon: Fix memory leak in --monitor implementation.
authorBen Pfaff <blp@nicira.com>
Tue, 2 Feb 2010 22:36:19 +0000 (14:36 -0800)
committerBen Pfaff <blp@nicira.com>
Tue, 2 Feb 2010 23:21:09 +0000 (15:21 -0800)
This leaked a small amount of memory each time a daemon process was
created.  It is only important if a daemon is otherwise very buggy.

Found with valgrind.

lib/daemon.c

index 140e0f7..46c9a88 100644 (file)
@@ -364,6 +364,7 @@ monitor_daemon(pid_t daemon_pid)
             }
         }
     }
+    free(status_msg);
 
     /* Running in new daemon process. */
     proctitle_restore();