Signed-off-by: John Ferlan <jferlan@redhat.com>
Reviewed-by: Erik Skultety <eskultet@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
authdef->secrettype);
goto cleanup;
}
- iscsisrc->src->auth = authdef;
- authdef = NULL;
+ VIR_STEAL_PTR(iscsisrc->src->auth, authdef);
}
cur = cur->next;
}
goto cleanup;
}
- source->auth = authdef;
- authdef = NULL;
+ VIR_STEAL_PTR(source->auth, authdef);
}
/* Option protocol version string (NFSvN) */
if (VIR_STRDUP(authdef->secrettype, secrettype) < 0)
goto error;
}
- def->src->auth = authdef;
- authdef = NULL;
+ VIR_STEAL_PTR(def->src->auth, authdef);
/* Cannot formulate a secretType (eg, usage or uuid) given
* what is provided.
if (VIR_STRDUP(authdef->secrettype,
virSecretUsageTypeToString(VIR_SECRET_USAGE_TYPE_CEPH)) < 0)
goto error;
- src->auth = authdef;
+ VIR_STEAL_PTR(src->auth, authdef);
src->authInherited = true;
- authdef = NULL;
/* Cannot formulate a secretType (eg, usage or uuid) given
* what is provided.