From: John Wolfe Date: Mon, 19 Apr 2021 18:08:10 +0000 (-0700) Subject: Check a previously unchecked return value. X-Git-Tag: stable-11.3.0~65 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a58b9c39768dd4582a2ccbd2483ae6c02d894528;p=thirdparty%2Fopen-vm-tools.git Check a previously unchecked return value. Fixes an "Unused value" issue reported from a Coverity scan of open-vm-tools. --- diff --git a/open-vm-tools/vgauthImport/vgauthImport.c b/open-vm-tools/vgauthImport/vgauthImport.c index e6a936ea1..d4964ce57 100644 --- a/open-vm-tools/vgauthImport/vgauthImport.c +++ b/open-vm-tools/vgauthImport/vgauthImport.c @@ -251,6 +251,12 @@ ProcessQueryReply(char *result, if (addMapped) { vgErr = VGAuth_QueryMappedAliases(ctx, 0, NULL, &numMapped, &maList); + if (VGAUTH_FAILED(vgErr)) { + fprintf(stderr, "VGAuth_QueryMappedAliases failed.\n"); + status = FALSE; + goto done; + } + for (i = 0; i < numMapped; i++) { if ((strcmp(pemCert, maList[i].pemCert) == 0) && (strcmp(userName, maList[i].userName) == 0)) {