]> xenbits.xensource.com Git - libvirt.git/commitdiff
virNetworkObjDispose: Don't leak virMacMap object
authorMichal Privoznik <mprivozn@redhat.com>
Wed, 5 Apr 2017 08:25:50 +0000 (10:25 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Wed, 5 Apr 2017 13:18:30 +0000 (15:18 +0200)
Even though the virMacMap object is not necessarily created at
the same time as the network object, the former makes no sense
without the latter and thus should be unref'd in the network
object dispose function.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
src/conf/network_conf.c

index 48e0001899e9a77340d0e9315cfe85ff358a5285..dc15fc9acf8f99c9e9fa587c264428f45a75d325 100644 (file)
@@ -443,6 +443,7 @@ virNetworkObjDispose(void *obj)
     virNetworkDefFree(net->def);
     virNetworkDefFree(net->newDef);
     virBitmapFree(net->class_id);
+    virObjectUnref(net->macmap);
 }
 
 static void