args will be free by cleanup_charp. FREE(args) is unnecessary before return. Remove it. Signed-off-by: Lixiaokeng <lixiaokeng@xxxxxxxxxx> Reviewed-by: Benjamin Marzinski <bmarzins@xxxxxxxxxx> --- 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 dm-devel@xxxxxxxxxx https://listman.redhat.com/mailman/listinfo/dm-devel