From 952ba18551ec4d9b6be6d2fe28b11f27e8dc17cd Mon Sep 17 00:00:00 2001 From: William Tu Date: Wed, 6 Jan 2016 10:49:35 -0800 Subject: [PATCH] test-netflow: Fix memory leak reported by valgrind. Test case 890: ofproto-dpif - NetFlow flow expiration - IPv4 collector Valgrind reports two leaks below: unixctl_server_create (unixctl.c:250) test_netflow_main (test-netflow.c:200) ovstest_wrapper_test_netflow_main__ (test-netflow.c:301) ovs_cmdl_run_command (command-line.c:121) main (ovstest.c:132) and ofpbuf_init (ofpbuf.c:124) test_netflow_main (test-netflow.c:208) ovstest_wrapper_test_netflow_main__ (test-netflow.c:301) ovs_cmdl_run_command (command-line.c:121) main (ovstest.c:132) Signed-off-by: William Tu Signed-off-by: Daniele Di Proietto Co-authored-by: Daniele Di Proietto --- tests/test-netflow.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/test-netflow.c b/tests/test-netflow.c index 2abc57fdc..47d0f201c 100644 --- a/tests/test-netflow.c +++ b/tests/test-netflow.c @@ -233,6 +233,9 @@ test_netflow_main(int argc, char *argv[]) unixctl_server_wait(server); poll_block(); } + + ofpbuf_uninit(&buf); + unixctl_server_destroy(server); } static void -- 2.20.1