From 391097b6106ebdb4466f471d38a04520ee1ab348 Mon Sep 17 00:00:00 2001 From: Yi-Hung Wei Date: Fri, 7 Apr 2017 14:43:46 -0700 Subject: [PATCH] ofproto-dpif: Fix memory leak in disable_datapath_clone() In testcase "ofproto-dpif - clone action", valgrind reports a memory leak with the following call stack. xrealloc (util.c:123) ds_reserve (dynamic-string.c:63) ds_put_format_valist (dynamic-string.c:161) ds_put_format (dynamic-string.c:142) disable_datapath_clone (ofproto-dpif.c:5206) process_command (unixctl.c:313) run_connection (unixctl.c:347) unixctl_server_run (unixctl.c:400) main (ovs-vswitchd.c:112) Signed-off-by: Yi-Hung Wei Signed-off-by: Ben Pfaff --- ofproto/ofproto-dpif.c | 1 + 1 file changed, 1 insertion(+) diff --git a/ofproto/ofproto-dpif.c b/ofproto/ofproto-dpif.c index 5d36d2d5a9d..6108c84ad25 100644 --- a/ofproto/ofproto-dpif.c +++ b/ofproto/ofproto-dpif.c @@ -5257,6 +5257,7 @@ disable_datapath_clone(struct unixctl_conn *conn OVS_UNUSED, udpif_flush(ofproto->backer->udpif); ds_put_format(&ds, "Datapath clone action disabled for bridge %s", br); unixctl_command_reply(conn, ds_cstr(&ds)); + ds_destroy(&ds); } static void