]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
virNetDevVlanParse: Don't clear data on failure
authorPeter Krempa <pkrempa@redhat.com>
Mon, 20 Oct 2025 13:15:13 +0000 (15:15 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Tue, 21 Oct 2025 13:33:54 +0000 (15:33 +0200)
Clearing the data on failure is pointless as it's still cleared when
other parts of the parser fail.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
src/conf/netdev_vlan_conf.c

index 1ac66aec54f1a65a4e827878b1f76ae2336c9906..b98c4d92cf3f6127bc76d086f2e7b6ebab3c4d05 100644 (file)
@@ -122,8 +122,6 @@ virNetDevVlanParse(xmlNodePtr node, xmlXPathContextPtr ctxt, virNetDevVlan *def)
  cleanup:
     VIR_FREE(tagNodes);
     VIR_FREE(trunk);
-    if (ret < 0)
-        virNetDevVlanClear(def);
     return ret;
 }