[ovs-dev] [PATCH] dpif-netdev: Fix memory leak in dpif_netdev_flow_put()
Ryan Wilson
wryan at nicira.com
Wed Jun 25 20:05:17 UTC 2014
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 <wryan at 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
More information about the dev
mailing list