conf: eliminate pointless setting of interface model

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>
This commit is contained in:
Laine Stump 2021-01-28 23:39:33 -05:00
parent c2e47fb334
commit 2adfd26ec9

View File

@ -2468,7 +2468,6 @@ virDomainNetDefFree(virDomainNetDefPtr def)
return; return;
VIR_FREE(def->modelstr); VIR_FREE(def->modelstr);
def->model = VIR_DOMAIN_NET_MODEL_UNKNOWN;
switch (def->type) { switch (def->type) {
case VIR_DOMAIN_NET_TYPE_VHOSTUSER: case VIR_DOMAIN_NET_TYPE_VHOSTUSER: