[ovs-dev] Possible memory leak in bundle_destroy?
Sabyasachi Sengupta
Sabyasachi.Sengupta at alcatel-lucent.com
Wed Jan 21 23:38:48 UTC 2015
Hi,
I saw that bundle_destroy calls mbridge_unregister_bundle with bundle->aux.
However the second parameter of mbridge_unregister_bundle is ofbundle. When
creating the bundle in mbridge_bundle_register, we setup mbundle using
ofbundle. Shouldn't the call to unregister be just ofbundle pointer instead?
I'm wondering how would otherwise mbridge_unregister_bundle find the mirror
bundle and clean it up? Is there a memory leak?
--- a/ofproto/ofproto-dpif.c
+++ b/ofproto/ofproto-dpif.c
@@ -2343,7 +2343,11 @@ bundle_destroy(struct ofbundle *bundle)
}
ofproto = bundle->ofproto;
- mbridge_unregister_bundle(ofproto->mbridge, bundle->aux);
+ mbridge_unregister_bundle(ofproto->mbridge, bundle);
Thanks,
Sabya
More information about the dev
mailing list