From a1cd27a4407460adef7baef5933af9a72ce85fc5 Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Wed, 21 Jan 2015 21:08:12 -0800 Subject: [PATCH] ofproto-dpif: Fix memory leak of mirrors in bundle_destroy(). The mirrors are added in bundle_set() with 'bundle' as aux so they must be removed with the same aux, but the call used 'bundle->aux' instead. Reported-by: Sabyasachi Sengupta Signed-off-by: Ben Pfaff --- AUTHORS | 1 + ofproto/ofproto-dpif.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/AUTHORS b/AUTHORS index 8db40267a..54da3471d 100644 --- a/AUTHORS +++ b/AUTHORS @@ -263,6 +263,7 @@ Simon Jouet simon.jouet@gmail.com Spiro Kourtessis spiro@vmware.com Sridhar Samudrala samudrala.sridhar@gmail.com Srini Seetharaman seethara@stanford.edu +Sabyasachi Sengupta Sabyasachi.Sengupta@alcatel-lucent.com Stephen Hemminger shemminger@vyatta.com Stephen Finucane stephen.finucane@intel.com Suganya Ramachandran suganyar@vmware.com diff --git a/ofproto/ofproto-dpif.c b/ofproto/ofproto-dpif.c index dc555ddde..c18ed32e6 100644 --- a/ofproto/ofproto-dpif.c +++ b/ofproto/ofproto-dpif.c @@ -2309,7 +2309,7 @@ bundle_destroy(struct ofbundle *bundle) } ofproto = bundle->ofproto; - mbridge_unregister_bundle(ofproto->mbridge, bundle->aux); + mbridge_unregister_bundle(ofproto->mbridge, bundle); ovs_rwlock_wrlock(&xlate_rwlock); xlate_bundle_remove(bundle); -- 2.20.1