diff mbox series

[ovs-dev,v2,07/26] ovn-dbctl: Fix memory leak in client mode.

Message ID 20210401232108.3902274-8-blp@ovn.org
State Not Applicable
Headers show
Series ddlog 5x performance improvement | expand

Commit Message

Ben Pfaff April 1, 2021, 11:20 p.m. UTC
This isn't notable, since this commit frees it just before exiting, but
it cleans up the Address Sanitizer report.

Signed-off-by: Ben Pfaff <blp@ovn.org>
---
 utilities/ovn-dbctl.c | 4 ++++
 1 file changed, 4 insertions(+)
diff mbox series

Patch

diff --git a/utilities/ovn-dbctl.c b/utilities/ovn-dbctl.c
index 28ebc6267066..d815dc5c8c5f 100644
--- a/utilities/ovn-dbctl.c
+++ b/utilities/ovn-dbctl.c
@@ -1210,5 +1210,9 @@  dbctl_client(const struct ovn_dbctl_options *dbctl_options,
     free(cmd_result);
     free(cmd_error);
     jsonrpc_close(client);
+    for (int i = 0; i < argc; i++) {
+        free(argv[i]);
+    }
+    free(argv);
     exit(exit_status);
 }