From: John Ferlan Date: Fri, 14 Apr 2017 16:35:26 +0000 (-0400) Subject: secret: Need to set data->error on VIR_ALLOC_N failure X-Git-Tag: v3.3.0-rc1~92 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=74face42b653f02e7e02866f296cf696731ea7fa;p=thirdparty%2Flibvirt.git 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 --- diff --git a/src/conf/virsecretobj.c b/src/conf/virsecretobj.c index 049cab3842..cc18459618 100644 --- a/src/conf/virsecretobj.c +++ b/src/conf/virsecretobj.c @@ -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;