2
0
mirror of https://github.com/openvswitch/ovs synced 2025-10-25 15:07:05 +00:00

ovs-vsctl: Free memory on successful exit.

This is not important in itself, but it helps to spot real memory leaks.

Found with valgrind.
This commit is contained in:
Ben Pfaff
2010-02-02 14:27:22 -08:00
parent a3326252a1
commit b86b43aa48

View File

@@ -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);
}