From: John Wolfe Date: Wed, 19 Aug 2020 17:01:17 +0000 (-0700) Subject: Fix a dereference after null check reported by Coverity. X-Git-Tag: stable-11.1.5~8 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4437575805152d81951c6a7f5dab6e6d7a3c56cc;p=thirdparty%2Fopen-vm-tools.git Fix a dereference after null check reported by Coverity. Original Description: | Fix dereference after null check reported by Coverity. | | Remove a superfluous NULL pointer test that causes Coverity | to report a dereference after null check. | | QA Notes: | Testing Done: | - Sandboxes: | -- obj: Build 36442558 queued (vgauth-sdk/main): | https://buildweb.eng.vmware.com/sb/36442558/ | -- obj: Build 36442647 queued (tools/main): | https://buildweb.eng.vmware.com/sb/36442647/ | Documentation Notes: | Bug Number: 2571476 | Reviewed by: jwolfe, lemke, stanguturi | Approved by: | Mailto: | Review URL: https://reviewboard.eng.vmware.com/r/1668542/ | SVS Submit Restricted: Yes | Post Submit Tests: --- diff --git a/open-vm-tools/vgauth/common/prefs.c b/open-vm-tools/vgauth/common/prefs.c index b269b8e44..50d77fecf 100644 --- a/open-vm-tools/vgauth/common/prefs.c +++ b/open-vm-tools/vgauth/common/prefs.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2011-2016 VMware, Inc. All rights reserved. + * Copyright (C) 2011-2016,2020 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -264,7 +264,7 @@ Pref_LogAllEntries(const PrefHandle ph) groupNames[i], &numKeys, &gErr); - if ((NULL == keyNames) && (NULL != gErr)) { + if (NULL != gErr) { g_warning("%s: g_key_file_get_keys(%s) failed: %s\n", __FUNCTION__, groupNames[i], gErr->message); g_error_free(gErr);