We get alias by strdup, and should free it after using.
Sigined-off-by:lixiaokenglixiaokeng@huawei.com --- multipathd/main.c | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/multipathd/main.c b/multipathd/main.c index 0327100..e4ff027 100644 --- a/multipathd/main.c +++ b/multipathd/main.c @@ -1900,10 +1900,12 @@ check_path (struct vectors * vecs, struct path * pp, int ticks) } if (ev_add_map(dev_path, alias, vecs)) { condlog(2, "fail to add map for mpp %s", alias); + FREE(alias); return 0; } else { condlog(2, "success to add map for mpp %s", alias); } + FREE(alias); } } else { return 0; --