miniflow_destroy() needs to be called after using miniflow_init().
Otherwise, if the miniflow mallocs data, then a memory leak may
occur.

Found by inspection.

Signed-off-by: Ryan Wilson <wr...@nicira.com>
---
 lib/dpif-netdev.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/lib/dpif-netdev.c b/lib/dpif-netdev.c
index e814645..c7055bb 100644
--- a/lib/dpif-netdev.c
+++ b/lib/dpif-netdev.c
@@ -1362,6 +1362,7 @@ dpif_netdev_flow_put(struct dpif *dpif, const struct 
dpif_flow_put *put)
         }
     }
     ovs_mutex_unlock(&dp->flow_mutex);
+    miniflow_destroy(&miniflow);
 
     return error;
 }
-- 
1.7.9.5

_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to