We allocated a buffer for wait_probe_path via strdup, but failed to free
it in the error path.

Cc: Dan Williams <[email protected]>
Signed-off-by: Vishal Verma <[email protected]>
---
 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

_______________________________________________
Linux-nvdimm mailing list
[email protected]
https://lists.01.org/mailman/listinfo/linux-nvdimm

Reply via email to