We allocated a buffer for wait_probe_path via strdup, but failed to free
it in the error path.
Cc: Dan Williams <dan.j.williams(a)intel.com>
Signed-off-by: Vishal Verma <vishal.l.verma(a)intel.com>
---
ndctl/lib/libndctl.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/ndctl/lib/libndctl.c b/ndctl/lib/libndctl.c
index 027842b..60143d9 100644
--- a/ndctl/lib/libndctl.c
+++ b/ndctl/lib/libndctl.c
@@ -809,6 +809,7 @@ static void *add_bus(void *parent, int id, const char *ctl_base)
err_dev_path:
err_read:
+ free(bus->wait_probe_path);
free(bus->provider);
free(bus->bus_buf);
free(bus);
--
2.9.5