diff mbox

[ovs-dev] ovn: fix ovn-northd leak in build_acls

Message ID 1478035199-9109-1-git-send-email-flavio@flaviof.com
State Accepted
Headers show

Commit Message

Flaviof Nov. 1, 2016, 9:19 p.m. UTC
Avoid leak due to missing ds_destroy in build_acl for non-stateful
drop action.

Found via inspection.  I do not know that this fixes a common leak.

Signed-off-by: Flavio Fernandes <flavio@flaviof.com>
---
 ovn/northd/ovn-northd.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Ben Pfaff Nov. 1, 2016, 9:42 p.m. UTC | #1
On Tue, Nov 01, 2016 at 04:19:59PM -0500, Flavio Fernandes wrote:
> Avoid leak due to missing ds_destroy in build_acl for non-stateful
> drop action.
> 
> Found via inspection.  I do not know that this fixes a common leak.
> 
> Signed-off-by: Flavio Fernandes <flavio@flaviof.com>

Thanks!  Applied to master and branch-2.6.
diff mbox

Patch

diff --git a/ovn/northd/ovn-northd.c b/ovn/northd/ovn-northd.c
index ad0739c..91affe4 100644
--- a/ovn/northd/ovn-northd.c
+++ b/ovn/northd/ovn-northd.c
@@ -2571,6 +2571,7 @@  build_acls(struct ovn_datapath *od, struct hmap *lflows)
                 ovn_lflow_add(lflows, od, stage,
                               acl->priority + OVN_ACL_PRI_OFFSET,
                               acl->match, "drop;");
+                ds_destroy(&match);
             }
         }
     }