[dm-devel] [PATCH] multipath-tools: multipathd: Fix memory leak on load_config().
Gris Ge
fge at redhat.com
Sun Jan 22 07:14:55 UTC 2017
* Just free_config() before exit.
Signed-off-by: Gris Ge <fge at redhat.com>
---
multipathd/main.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/multipathd/main.c b/multipathd/main.c
index 1e64afc..2f5042e 100644
--- a/multipathd/main.c
+++ b/multipathd/main.c
@@ -2633,6 +2633,7 @@ main (int argc, char *argv[])
conf->verbosity = verbosity;
uxsock_timeout = conf->uxsock_timeout;
uxclnt(optarg, uxsock_timeout + 100);
+ free_config(conf);
exit(0);
case 'B':
bindings_read_only = 1;
@@ -2667,6 +2668,7 @@ main (int argc, char *argv[])
}
c += snprintf(c, s + CMDSIZE - c, "\n");
uxclnt(s, uxsock_timeout + 100);
+ free_config(conf);
exit(0);
}
--
1.8.3.1
More information about the dm-devel
mailing list