diff options
author | Jakub Sitnicki <jkbs@redhat.com> | 2018-07-19 15:51:10 +0200 |
---|---|---|
committer | Ben Pfaff <blp@ovn.org> | 2018-07-23 15:59:43 -0700 |
commit | 01c9c5110a032ca41f66c3651c0b59ed05aec36c (patch) | |
tree | 5397b472ad1332184907c3a82a59b051f7ce1afe /ovn/utilities/ovn-nbctl.c | |
parent | 0d1eed891024f18be7b6ee50220fea6f343a6e2e (diff) | |
download | openvswitch-01c9c5110a032ca41f66c3651c0b59ed05aec36c.tar.gz |
ovn-nbctl: Pull up releasing IDL from do_nbctl().
Destroy IDL resources in the routine where we allocated them.
Preparatory work for reusing the main loop in daemon mode.
Signed-off-by: Jakub Sitnicki <jkbs@redhat.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
Diffstat (limited to 'ovn/utilities/ovn-nbctl.c')
-rw-r--r-- | ovn/utilities/ovn-nbctl.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/ovn/utilities/ovn-nbctl.c b/ovn/utilities/ovn-nbctl.c index 6e71a8073..9fd6f6495 100644 --- a/ovn/utilities/ovn-nbctl.c +++ b/ovn/utilities/ovn-nbctl.c @@ -127,6 +127,9 @@ main(int argc, char *argv[]) main_loop(args, commands, n_commands, idl); + ovsdb_idl_destroy(idl); + idl = the_idl = NULL; + for (struct ctl_command *c = commands; c < &commands[n_commands]; c++) { ds_destroy(&c->output); table_destroy(c->table); @@ -4450,7 +4453,6 @@ do_nbctl(const char *args, struct ctl_command *commands, size_t n_commands, } ovsdb_idl_txn_destroy(txn); - ovsdb_idl_destroy(idl); return true; |