]> git.ipfire.org Git - thirdparty/open-vm-tools.git/commitdiff
Fix a dereference after null check reported by Coverity.
authorJohn Wolfe <jwolfe@vmware.com>
Wed, 19 Aug 2020 17:01:17 +0000 (10:01 -0700)
committerJohn Wolfe <jwolfe@vmware.com>
Wed, 19 Aug 2020 17:01:17 +0000 (10:01 -0700)
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:

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);