summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSamuel Mendoza-Jonas <sam.mj@au1.ibm.com>2015-05-21 16:30:07 +1000
committerSamuel Mendoza-Jonas <sam.mj@au1.ibm.com>2015-08-06 14:08:09 +1000
commitfa5c9dfa37957d45b13424ade53d477f0b123102 (patch)
treea04586e60d7ed997651eb0b15de9f0beeefe9206
parent20dca73557fa40388438404de1fa0e2be7c30207 (diff)
downloadtalos-petitboot-fa5c9dfa37957d45b13424ade53d477f0b123102.tar.gz
talos-petitboot-fa5c9dfa37957d45b13424ade53d477f0b123102.zip
discover: Ensure destroy_device is called on reinit
Signed-off-by: Samuel Mendoza-Jonas <sam.mj@au1.ibm.com>
-rw-r--r--discover/device-handler.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/discover/device-handler.c b/discover/device-handler.c
index 64095f1..d2b50b5 100644
--- a/discover/device-handler.c
+++ b/discover/device-handler.c
@@ -330,9 +330,11 @@ void device_handler_reinit(struct device_handler *handler)
list_init(&handler->unresolved_boot_options);
/* drop all devices */
- for (i = 0; i < handler->n_devices; i++)
+ for (i = 0; i < handler->n_devices; i++) {
discover_server_notify_device_remove(handler->server,
handler->devices[i]->device);
+ talloc_free(handler->devices[i]);
+ }
talloc_free(handler->devices);
handler->devices = NULL;
OpenPOWER on IntegriCloud