From b86b43aa485b5ab613ee6853b58f070db35339c9 Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Tue, 2 Feb 2010 14:27:22 -0800 Subject: [PATCH] ovs-vsctl: Free memory on successful exit. This is not important in itself, but it helps to spot real memory leaks. Found with valgrind. --- utilities/ovs-vsctl.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/utilities/ovs-vsctl.c b/utilities/ovs-vsctl.c index f8863bfc..981a4e29 100644 --- a/utilities/ovs-vsctl.c +++ b/utilities/ovs-vsctl.c @@ -2581,7 +2581,10 @@ do_vsctl(const char *args, struct vsctl_command *commands, size_t n_commands, } else { fputs(ds_cstr(ds), stdout); } + ds_destroy(&c->output); + shash_destroy(&c->options); } + free(commands); if (wait_for_reload && status != TXN_UNCHANGED) { for (;;) { @@ -2598,6 +2601,7 @@ do_vsctl(const char *args, struct vsctl_command *commands, size_t n_commands, } done: ; } + ovsdb_idl_destroy(idl); exit(EXIT_SUCCESS); } -- 2.30.2