[ovs-dev] [PATCH ovn 2/2] ovn-controller: Free some more memory before exit.
Russell Bryant
rbryant at redhat.com
Fri May 1 18:22:02 UTC 2015
Free a few pointers to malloc'd memory before exit.
Signed-off-by: Russell Bryant <rbryant at redhat.com>
---
ovn/controller/ovn-controller.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/ovn/controller/ovn-controller.c b/ovn/controller/ovn-controller.c
index 778dd43..9d61a48 100644
--- a/ovn/controller/ovn-controller.c
+++ b/ovn/controller/ovn-controller.c
@@ -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");
--
2.1.0
More information about the dev
mailing list