diff mbox series

[ovs-dev,v3,02/27] ovn-nbctl: Fix memory leak in client mode.

Message ID 20210507040659.26830-3-blp@ovn.org
State Accepted
Headers show
Series ddlog 5x performance improvement | expand

Commit Message

Ben Pfaff May 7, 2021, 4:06 a.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-nbctl.c | 4 ++++
 1 file changed, 4 insertions(+)
diff mbox series

Patch

diff --git a/utilities/ovn-nbctl.c b/utilities/ovn-nbctl.c
index 042c210020b8..e3af0be926da 100644
--- a/utilities/ovn-nbctl.c
+++ b/utilities/ovn-nbctl.c
@@ -7100,5 +7100,9 @@  nbctl_client(const char *socket_name,
     free(cmd_result);
     free(cmd_error);
     jsonrpc_close(client);
+    for (int i = 0; i < argc; i++) {
+        free(argv[i]);
+    }
+    free(argv);
     exit(exit_status);
 }