[PATCH] multipath-tools: multipathd: Fix memory leak on load_config().

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



 * Just free_config() before exit.

Signed-off-by: Gris Ge <fge@xxxxxxxxxx>
---
 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

--
dm-devel mailing list
dm-devel@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/dm-devel



[Index of Archives]     [DM Crypt]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Packaging]     [Fedora SELinux]     [Yosemite Discussion]     [KDE Users]     [Fedora Docs]

  Powered by Linux