From: Oliver Kurth Date: Wed, 10 Jun 2020 19:05:43 +0000 (-0700) Subject: Fix dereference after null check reported by Coverity. X-Git-Tag: stable-11.2.0~176 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=96c50d2068e45f2803b8ad8c1e186480d82f4411;p=thirdparty%2Fopen-vm-tools.git Fix dereference after null check reported by Coverity. Remove a superfluous NULL pointer test that causes Coverity to report a dereference after null check. --- 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);