[ovs-dev] [PATCH 2/3] test-ovsdb: Fix memory leak

Yifeng Sun pkusunyifeng at gmail.com
Tue Oct 31 15:33:04 UTC 2017


Reported by `make check-valgrind`.
This patch was tested by `make check` and `make check-valgrind`.

Signed-off-by: Yifeng Sun <pkusunyifeng at gmail.com>
---
 tests/test-ovsdb.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tests/test-ovsdb.c b/tests/test-ovsdb.c
index 451172cdcc34..b5147fc055e3 100644
--- a/tests/test-ovsdb.c
+++ b/tests/test-ovsdb.c
@@ -582,6 +582,7 @@ do_parse_atom_strings(struct ovs_cmdl_context *ctx)
         ovsdb_atom_destroy(&atom, base.type);
         if (range_end_atom) {
             ovsdb_atom_destroy(range_end_atom, base.type);
+	    free(range_end_atom);
         }
     }
     ovsdb_base_type_destroy(&base);
-- 
2.7.4



More information about the dev mailing list