[ovs-dev] [PATCH ovn] ovn-northd-ddlog: Fix memleak when destroying context.
Dumitru Ceara
dceara at redhat.com
Fri Jun 4 16:48:13 UTC 2021
This is benign but AddressSanitizer was complaining about it:
Direct leak of 40 byte(s) in 1 object(s) allocated from:
#0 0x7fa93cd6d667 in __interceptor_malloc (/lib64/libasan.so.6+0xb0667)
#1 0x1be8d3e in xmalloc__ lib/util.c:137
#2 0x1be8e1a in xmalloc lib/util.c:172
#3 0x1b799d3 in json_create lib/json.c:1451
#4 0x1b74314 in json_integer_create lib/json.c:263
#5 0x1b7d38a in jsonrpc_create_id lib/jsonrpc.c:563
#6 0x1b7d3a5 in jsonrpc_create_request lib/jsonrpc.c:570
#7 0x1b8d851 in ovsdb_cs_send_transaction lib/ovsdb-cs.c:1376
#8 0x40b017 in northd_send_output_only_data_request northd/ovn-northd-ddlog.c:290
#9 0x40c802 in northd_run northd/ovn-northd-ddlog.c:568
#10 0x410225 in main northd/ovn-northd-ddlog.c:1289
#11 0x7fa93c4a9081 in __libc_start_main ../csu/libc-start.c:308
Signed-off-by: Dumitru Ceara <dceara at redhat.com>
---
northd/ovn-northd-ddlog.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/northd/ovn-northd-ddlog.c b/northd/ovn-northd-ddlog.c
index a4f2960bd..444e13e39 100644
--- a/northd/ovn-northd-ddlog.c
+++ b/northd/ovn-northd-ddlog.c
@@ -206,6 +206,7 @@ northd_ctx_destroy(struct northd_ctx *ctx)
{
if (ctx) {
ovsdb_cs_destroy(ctx->cs);
+ json_destroy(ctx->request_id);
json_destroy(ctx->output_only_data);
free(ctx->prefix);
free(ctx);
--
2.27.0
More information about the dev
mailing list