]> git.ipfire.org Git - thirdparty/open-vm-tools.git/commitdiff
Fix dereference after null check reported by Coverity.
authorOliver Kurth <okurth@vmware.com>
Wed, 10 Jun 2020 19:05:43 +0000 (12:05 -0700)
committerOliver Kurth <okurth@vmware.com>
Wed, 10 Jun 2020 19:05:43 +0000 (12:05 -0700)
Remove a superfluous NULL pointer test that causes Coverity
to report a dereference after null check.

open-vm-tools/vgauth/common/prefs.c

index b269b8e44228b531e2af3e362adc2e28b5e1e82a..50d77fecf2e0d003c97b788046091a47af662c26 100644 (file)
@@ -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);