summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeremy Kerr <jk@ozlabs.org>2013-10-18 13:26:23 +0800
committerJeremy Kerr <jk@ozlabs.org>2013-10-21 19:30:08 +0800
commit4d03d190a0e5a0d09b064c5016f576a2e7f9c483 (patch)
tree179b84d02ae86f19efee133ce8b08797a77cded0
parent00f3a51739b5628530a8c891ff273b611c155b2e (diff)
downloadtalos-petitboot-4d03d190a0e5a0d09b064c5016f576a2e7f9c483.tar.gz
talos-petitboot-4d03d190a0e5a0d09b064c5016f576a2e7f9c483.zip
discover: cleanup allocated data
We have a few allocations hanging around at the end of pb-discover; free them. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
-rw-r--r--discover/pb-discover.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/discover/pb-discover.c b/discover/pb-discover.c
index 9b1f200..b154130 100644
--- a/discover/pb-discover.c
+++ b/discover/pb-discover.c
@@ -13,6 +13,7 @@
#include <log/log.h>
#include <pb-config/pb-config.h>
#include <process/process.h>
+#include <talloc/talloc.h>
#include "udev.h"
#include "user-event.h"
@@ -200,10 +201,16 @@ int main(int argc, char *argv[])
}
device_handler_destroy(handler);
+ user_event_destroy(uev);
udev_destroy(udev);
+ discover_server_destroy(server);
config_fini();
+ talloc_free(waitset);
pb_log("--- end ---\n");
+ if (log != stderr)
+ fclose(log);
+
return EXIT_SUCCESS;
}
OpenPOWER on IntegriCloud