Zhiqiang Liu <[email protected]> writes: > In add_bus(), bus->bus_path is set by calling parent_dev_path(), > which will finally adopt realpath(, NULL) to allocate new path. > However, bus->bus_path will not be freed in err_read tag, then, > memory leakage occurs. > > Signed-off-by: Zhiqiang Liu <[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 ad521d3..3926382 100644 > --- a/ndctl/lib/libndctl.c > +++ b/ndctl/lib/libndctl.c > @@ -975,6 +975,7 @@ static void *add_bus(void *parent, int id, const char > *ctl_base) > free(bus->wait_probe_path); > free(bus->scrub_path); > free(bus->provider); > + free(bus->bus_path); > free(bus->bus_buf); > free(bus); > err_bus:
Acked-by: Jeff Moyer <[email protected]> _______________________________________________ Linux-nvdimm mailing list -- [email protected] To unsubscribe send an email to [email protected]
