From 07c747d036eefc54aff602dd638485adbb2099cd Mon Sep 17 00:00:00 2001 From: Russell Bryant Date: Fri, 1 May 2015 14:22:02 -0400 Subject: [PATCH] ovn-controller: Free some more memory before exit. Free a few pointers to malloc'd memory before exit. Signed-off-by: Russell Bryant Acked-by: Kyle Mestery Signed-off-by: Justin Pettit --- 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 778dd4337..9d61a48a2 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.20.1