mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 05:35:25 +00:00
lib: Don't set variable to NULL after VIR_FREE()
There are a few places where a variable is VIR_FREE()-d and then explicitly set to NULL. This is not necessary since VIR_FREE() does that for us. Signed-off-by: Michal Privoznik <mprivozn@redhat.com> Reviewed-by: Erik Skultety <eskultet@redhat.com>
This commit is contained in:
parent
726b9616b2
commit
ce880ad8ba
@ -12746,7 +12746,6 @@ virDomainGraphicsDefNew(virDomainXMLOption *xmlopt)
|
||||
if (xmlopt && xmlopt->privateData.graphicsNew &&
|
||||
!(def->privateData = xmlopt->privateData.graphicsNew())) {
|
||||
VIR_FREE(def);
|
||||
def = NULL;
|
||||
}
|
||||
|
||||
return def;
|
||||
|
@ -1813,7 +1813,6 @@ virNWFilterRuleDetailsParse(xmlNodePtr node,
|
||||
if (match && STREQ(match, "no"))
|
||||
match_flag = NWFILTER_ENTRY_ITEM_FLAG_IS_NEG;
|
||||
VIR_FREE(match);
|
||||
match = NULL;
|
||||
|
||||
while (att[idx].name != NULL) {
|
||||
prop = virXMLPropString(node, att[idx].name);
|
||||
|
@ -106,7 +106,6 @@ testTypedParamsFilter(const void *opaque G_GNUC_UNUSED)
|
||||
goto cleanup;
|
||||
}
|
||||
VIR_FREE(filtered);
|
||||
filtered = NULL;
|
||||
|
||||
nfiltered = virTypedParamsFilter(params, G_N_ELEMENTS(params),
|
||||
"bar", &filtered);
|
||||
|
Loading…
Reference in New Issue
Block a user