On Wed, 2020-12-16 at 21:34 -0600, Benjamin Marzinski wrote:
> On Wed, Dec 16, 2020 at 07:17:01PM +0100, [email protected] wrote:
> > 
> >  
> >     pp = alloc_path();
> >     if (!pp)
> > @@ -665,13 +666,17 @@ check_path_valid(const char *name, struct
> > config *conf, bool is_uevent)
> >     if (store_path(pathvec, pp) != 0) {
> 
> This will double-free the path, once here and again in cleanup.

argh, thanks - especially dumb with comment below :-/

> >             free_path(pp);
> >             goto fail;
> > +   } else {
> > +           /* make sure path isn't freed twice */
> > +           wwid = pp->wwid;
> > +           pp = NULL;
> >     }
> > 
> ...
> > +
> > +cleanup:
> > +   if (pp != NULL)
> 
> shouldn't this be free_path(pp)

Absolutely. I'll resend this one. As everything else is reviewed now,
I'll just resubmit this one.

Martin


--
dm-devel mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/dm-devel

Reply via email to