From: Ben Pfaff Date: Thu, 22 Jan 2015 05:08:12 +0000 (-0800) Subject: ofproto-dpif: Fix memory leak of mirrors in bundle_destroy(). X-Git-Tag: v2.3.2~45 X-Git-Url: http://git.cascardo.eti.br/?p=cascardo%2Fovs.git;a=commitdiff_plain;h=a1cd27a4407460adef7baef5933af9a72ce85fc5 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 --- 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);