multipath-tools: multipathd: Fix memory leak on load_config().
authorGris Ge <fge@redhat.com>
Sun, 22 Jan 2017 07:14:55 +0000 (15:14 +0800)
committerChristophe Varoqui <christophe.varoqui@opensvc.com>
Fri, 10 Feb 2017 11:31:00 +0000 (12:31 +0100)
 * Just free_config() before exit.

Signed-off-by: Gris Ge <fge@redhat.com>
multipathd/main.c

index ce5bce6..dc91151 100644 (file)
@@ -2706,6 +2706,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;
@@ -2740,6 +2741,7 @@ main (int argc, char *argv[])
                }
                c += snprintf(c, s + CMDSIZE - c, "\n");
                uxclnt(s, uxsock_timeout + 100);
+               free_config(conf);
                exit(0);
        }