]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
secret: Need to set data->error on VIR_ALLOC_N failure
authorJohn Ferlan <jferlan@redhat.com>
Fri, 14 Apr 2017 16:35:26 +0000 (12:35 -0400)
committerJohn Ferlan <jferlan@redhat.com>
Tue, 25 Apr 2017 19:33:22 +0000 (15:33 -0400)
Commit id 'bb1fba629' neglected to set when creating the function.

Signed-off-by: John Ferlan <jferlan@redhat.com>
src/conf/virsecretobj.c

index 049cab3842f74ac75a2baca3d124891927d377aa..cc184596184334276383d4ef6bd09b80246e0a10 100644 (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;