ovn-controller: Free some more memory before exit.
authorRussell Bryant <rbryant@redhat.com>
Fri, 1 May 2015 18:22:02 +0000 (14:22 -0400)
committerJustin Pettit <jpettit@nicira.com>
Fri, 1 May 2015 23:03:06 +0000 (16:03 -0700)
Free a few pointers to malloc'd memory before exit.

Signed-off-by: Russell Bryant <rbryant@redhat.com>
Acked-by: Kyle Mestery <mestery@mestery.com>
Signed-off-by: Justin Pettit <jpettit@nicira.com>
ovn/controller/ovn-controller.c

index 778dd43..9d61a48 100644 (file)
@@ -242,6 +242,9 @@ main(int argc, char *argv[])
     ovsdb_idl_destroy(ctx.ovnsb_idl);
 
     free(ctx.br_int_name);
+    free(ctx.chassis_id);
+    free(ovnsb_remote);
+    free(ovs_remote);
 
     exit(retval);
 }
@@ -305,7 +308,7 @@ parse_options(int argc, char *argv[])
     if (argc == 0) {
         ovs_remote = xasprintf("unix:%s/db.sock", ovs_rundir());
     } else if (argc == 1) {
-        ovs_remote = argv[0];
+        ovs_remote = xstrdup(argv[0]);
     } else {
         VLOG_FATAL("exactly zero or one non-option argument required; "
                    "use --help for usage");