On Tue, Nov 16, 2021 at 10:00:09PM +0800, lixiaokeng wrote: > arg will be free by cleanup_charp. FREE(args) > is unnecessary before return. Remove it. > > Signed-off-by: Lixiaokeng <[email protected]> Reviewed-by: Benjamin Marzinski <[email protected]> > --- > libmultipath/prioritizers/weightedpath.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/libmultipath/prioritizers/weightedpath.c > b/libmultipath/prioritizers/weightedpath.c > index ea03fc3d..32d1cf0c 100644 > --- a/libmultipath/prioritizers/weightedpath.c > +++ b/libmultipath/prioritizers/weightedpath.c > @@ -75,13 +75,12 @@ int prio_path_weight(struct path *pp, char *prio_args) > if (!prio_args) > return priority; > > - arg = temp = STRDUP(prio_args); > + arg = temp = strdup(prio_args); > > regex = get_next_string(&temp, split_char); > > /* Return default priority if the argument is not parseable */ > if (!regex) { > - FREE(arg); > return priority; > } > > --
-- dm-devel mailing list [email protected] https://listman.redhat.com/mailman/listinfo/dm-devel
