]> xenbits.xensource.com Git - libvirt.git/commitdiff
conf: eliminate pointless setting of interface model
authorLaine Stump <laine@redhat.com>
Fri, 29 Jan 2021 04:39:33 +0000 (23:39 -0500)
committerLaine Stump <laine@redhat.com>
Tue, 2 Feb 2021 05:27:58 +0000 (00:27 -0500)
There is no point in setting the interface model to unknown during
virDomainNetDefFree(), since we are about to free the object anyway
(and the model isn't used anywhere in the rest of the function).

Signed-off-by: Laine Stump <laine@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
src/conf/domain_conf.c

index 658f563b36b597a014df3417259b53164bdf879a..1a163857ca10db94a366856bdcf9c1a69c0cf48d 100644 (file)
@@ -2468,7 +2468,6 @@ virDomainNetDefFree(virDomainNetDefPtr def)
         return;
 
     VIR_FREE(def->modelstr);
-    def->model = VIR_DOMAIN_NET_MODEL_UNKNOWN;
 
     switch (def->type) {
     case VIR_DOMAIN_NET_TYPE_VHOSTUSER: