secret: Need to set data->error on VIR_ALLOC_N failure

Commit id 'bb1fba629' neglected to set when creating the function.

Signed-off-by: John Ferlan <jferlan@redhat.com>
This commit is contained in:
John Ferlan 2017-04-14 12:35:26 -04:00
parent 6b5ac3c71d
commit 74face42b6
1 changed files with 3 additions and 1 deletions

View File

@ -457,8 +457,10 @@ virSecretObjListGetHelper(void *payload,
if (data->uuids) {
char *uuidstr;
if (VIR_ALLOC_N(uuidstr, VIR_UUID_STRING_BUFLEN) < 0)
if (VIR_ALLOC_N(uuidstr, VIR_UUID_STRING_BUFLEN) < 0) {
data->error = true;
goto cleanup;
}
virUUIDFormat(obj->def->uuid, uuidstr);
data->uuids[data->got] = uuidstr;