mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-07 17:28:15 +00:00
conf,util,qemu: Use VIR_STEAL_PTR for authdef processing
Signed-off-by: John Ferlan <jferlan@redhat.com> Reviewed-by: Erik Skultety <eskultet@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
b4a4e8f71a
commit
a98d9daf07
@ -7632,8 +7632,7 @@ virDomainHostdevSubsysSCSIiSCSIDefParseXML(xmlNodePtr sourcenode,
|
|||||||
authdef->secrettype);
|
authdef->secrettype);
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
iscsisrc->src->auth = authdef;
|
VIR_STEAL_PTR(iscsisrc->src->auth, authdef);
|
||||||
authdef = NULL;
|
|
||||||
}
|
}
|
||||||
cur = cur->next;
|
cur = cur->next;
|
||||||
}
|
}
|
||||||
|
@ -584,8 +584,7 @@ virStoragePoolDefParseSource(xmlXPathContextPtr ctxt,
|
|||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
|
||||||
source->auth = authdef;
|
VIR_STEAL_PTR(source->auth, authdef);
|
||||||
authdef = NULL;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Option protocol version string (NFSvN) */
|
/* Option protocol version string (NFSvN) */
|
||||||
|
@ -133,8 +133,7 @@ qemuParseDriveURIString(virDomainDiskDefPtr def, virURIPtr uri,
|
|||||||
if (VIR_STRDUP(authdef->secrettype, secrettype) < 0)
|
if (VIR_STRDUP(authdef->secrettype, secrettype) < 0)
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
def->src->auth = authdef;
|
VIR_STEAL_PTR(def->src->auth, authdef);
|
||||||
authdef = NULL;
|
|
||||||
|
|
||||||
/* Cannot formulate a secretType (eg, usage or uuid) given
|
/* Cannot formulate a secretType (eg, usage or uuid) given
|
||||||
* what is provided.
|
* what is provided.
|
||||||
|
@ -2895,9 +2895,8 @@ virStorageSourceParseRBDColonString(const char *rbdstr,
|
|||||||
if (VIR_STRDUP(authdef->secrettype,
|
if (VIR_STRDUP(authdef->secrettype,
|
||||||
virSecretUsageTypeToString(VIR_SECRET_USAGE_TYPE_CEPH)) < 0)
|
virSecretUsageTypeToString(VIR_SECRET_USAGE_TYPE_CEPH)) < 0)
|
||||||
goto error;
|
goto error;
|
||||||
src->auth = authdef;
|
VIR_STEAL_PTR(src->auth, authdef);
|
||||||
src->authInherited = true;
|
src->authInherited = true;
|
||||||
authdef = NULL;
|
|
||||||
|
|
||||||
/* Cannot formulate a secretType (eg, usage or uuid) given
|
/* Cannot formulate a secretType (eg, usage or uuid) given
|
||||||
* what is provided.
|
* what is provided.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user