[ovs-git] [openvswitch/ovs] 93236a: test-ovsdb: Fix memory leak
GitHub
noreply at github.com
Thu Nov 2 21:22:16 UTC 2017
Branch: refs/heads/branch-2.8
Home: https://github.com/openvswitch/ovs
Commit: 93236ad99b21cc96d021ed38c90a5eef48466aa2
https://github.com/openvswitch/ovs/commit/93236ad99b21cc96d021ed38c90a5eef48466aa2
Author: Yifeng Sun <pkusunyifeng at gmail.com>
Date: 2017-11-02 (Thu, 02 Nov 2017)
Changed paths:
M tests/test-ovsdb.c
Log Message:
-----------
test-ovsdb: Fix memory leak
Valgrind testcase 1465 (integer atom enum from string) reports the leak below:
16 bytes in 1 blocks are definitely lost in loss record 2 of 5
at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
by 0x43F5F4: xmalloc (util.c:120)
by 0x424AC6: alloc_default_atoms (ovsdb-data.c:315)
by 0x4271E0: ovsdb_atom_from_string__ (ovsdb-data.c:508)
by 0x4271E0: ovsdb_atom_from_string (ovsdb-data.c:632)
by 0x40ADCC: do_parse_atom_strings (test-ovsdb.c:566)
by 0x41BA73: ovs_cmdl_run_command__ (command-line.c:115)
by 0x4051C9: main (test-ovsdb.c:72)
range_end_atom is allocated in ovsdb_atom_from_string__() and no one is
holding a reference to it at the end of do_parse_atom_strings(). It should
be freed here, as also pointed out by ovsdb_atom_destroy().
Signed-off-by: Yifeng Sun <pkusunyifeng at gmail.com>
Signed-off-by: Ben Pfaff <blp at ovn.org>
More information about the git
mailing list