Skip to content

Commit

Permalink
ovn-northd: Fix memory leak
Browse files Browse the repository at this point in the history
This leak was reported by valgrind (testing ovn -- IPv6 Neighbor
Solicitation for unknown MAC):

3,027 bytes in 49 blocks are definitely lost in loss record 210 of 218
    by 0x484C84: xrealloc (util.c:131)
    by 0x43CE41: ds_reserve (dynamic-string.c:63)
    by 0x43D29D: ds_put_format_valist (dynamic-string.c:161)
    by 0x43D3A3: ds_put_format (dynamic-string.c:142)
    by 0x412EEF: ovn_port_update_sbrec (ovn-northd.c:1948)
    by 0x4148B4: build_ports (ovn-northd.c:2109)
    by 0x4148B4: ovnnb_db_run.isra.37 (ovn-northd.c:6202)
    by 0x406FE0: main (ovn-northd.c:6854)

Signed-off-by: Yifeng Sun <pkusunyifeng@gmail.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
  • Loading branch information
yifsun authored and blp committed Jan 23, 2018
1 parent c360a98 commit 22407d3
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions ovn/northd/ovn-northd.c
Expand Up @@ -1949,6 +1949,7 @@ ovn_port_update_sbrec(struct northd_context *ctx,
}
const char *addresses = ds_cstr(&s);
sbrec_port_binding_set_mac(op->sb, &addresses, 1);
ds_destroy(&s);

struct smap ids = SMAP_INITIALIZER(&ids);
sbrec_port_binding_set_external_ids(op->sb, &ids);
Expand Down

0 comments on commit 22407d3

Please sign in to comment.