The memory containing the pointer is going to be freed momentarily anyway. Signed-off-by: Laine Stump <laine@xxxxxxxxxx> --- src/conf/domain_conf.c | 5 ----- src/conf/node_device_conf.c | 1 - 2 files changed, 6 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index c16036f5d8..658f563b36 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -1908,7 +1908,6 @@ virDomainVcpuDefFree(virDomainVcpuDefPtr info) return; virBitmapFree(info->cpumask); - info->cpumask = NULL; virObjectUnref(info->privateData); VIR_FREE(info); } @@ -2474,7 +2473,6 @@ virDomainNetDefFree(virDomainNetDefPtr def) switch (def->type) { case VIR_DOMAIN_NET_TYPE_VHOSTUSER: virObjectUnref(def->data.vhostuser); - def->data.vhostuser = NULL; break; case VIR_DOMAIN_NET_TYPE_VDPA: @@ -2493,7 +2491,6 @@ virDomainNetDefFree(virDomainNetDefPtr def) g_free(def->data.network.name); g_free(def->data.network.portgroup); virDomainActualNetDefFree(def->data.network.actual); - def->data.network.actual = NULL; break; case VIR_DOMAIN_NET_TYPE_BRIDGE: @@ -2537,10 +2534,8 @@ virDomainNetDefFree(virDomainNetDefPtr def) g_free(def->filter); virHashFree(def->filterparams); - def->filterparams = NULL; virNetDevBandwidthFree(def->bandwidth); - def->bandwidth = NULL; virNetDevVlanClear(&def->vlan); virObjectUnref(def->privateData); diff --git a/src/conf/node_device_conf.c b/src/conf/node_device_conf.c index 35f34b10e9..b6f73161b5 100644 --- a/src/conf/node_device_conf.c +++ b/src/conf/node_device_conf.c @@ -2422,7 +2422,6 @@ virNodeDevCapsDefFree(virNodeDevCapsDefPtr caps) VIR_FREE(data->net.ifname); VIR_FREE(data->net.address); virBitmapFree(data->net.features); - data->net.features = NULL; break; case VIR_NODE_DEV_CAP_SCSI_HOST: VIR_FREE(data->scsi_host.wwnn); -- 2.29.2