Skip to content

Commit

Permalink
ovn-northd-ddlog: Fix memleak when destroying context.
Browse files Browse the repository at this point in the history
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)
    ovn-org#1 0x1be8d3e in xmalloc__ lib/util.c:137
    ovn-org#2 0x1be8e1a in xmalloc lib/util.c:172
    ovn-org#3 0x1b799d3 in json_create lib/json.c:1451
    ovn-org#4 0x1b74314 in json_integer_create lib/json.c:263
    ovn-org#5 0x1b7d38a in jsonrpc_create_id lib/jsonrpc.c:563
    ovn-org#6 0x1b7d3a5 in jsonrpc_create_request lib/jsonrpc.c:570
    ovn-org#7 0x1b8d851 in ovsdb_cs_send_transaction lib/ovsdb-cs.c:1376
    ovn-org#8 0x40b017 in northd_send_output_only_data_request northd/ovn-northd-ddlog.c:290
    ovn-org#9 0x40c802 in northd_run northd/ovn-northd-ddlog.c:568
    ovn-org#10 0x410225 in main northd/ovn-northd-ddlog.c:1289
    ovn-org#11 0x7fa93c4a9081 in __libc_start_main ../csu/libc-start.c:308

Signed-off-by: Dumitru Ceara <dceara@redhat.com>
Signed-off-by: 0-day Robot <robot@bytheb.org>
  • Loading branch information
dceara authored and ovsrobot committed Jun 9, 2021
1 parent ea3387e commit 4067f76
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions northd/ovn-northd-ddlog.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 4067f76

Please sign in to comment.