We need to free the refwwid only when present.
Found by coverity.
Signed-off-by: Hannes Reinecke <[email protected]>
---
multipathd/cli_handlers.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/multipathd/cli_handlers.c b/multipathd/cli_handlers.c
index a1b7052..52bcdaa 100644
--- a/multipathd/cli_handlers.c
+++ b/multipathd/cli_handlers.c
@@ -715,6 +715,7 @@ cli_add_map (void * v, char ** reply, int * len, void *
data)
condlog(2, "%s: coalesce_paths failed",
param);
dm_lib_release();
+ FREE(refwwid);
}
} /*we attempt to create device only once*/
count++;
@@ -726,7 +727,6 @@ cli_add_map (void * v, char ** reply, int * len, void *
data)
}
rc = ev_add_map(dev_path, alias, vecs);
FREE(alias);
- FREE(refwwid);
return rc;
}
--
2.6.6
--
dm-devel mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/dm-devel