Fix for [pgpool-general: 6951] Fix-condition-tok-is-always-true
authorMuhammad Usama <m.usama@gmail.com>
Mon, 6 Apr 2020 09:12:00 +0000 (14:12 +0500)
committerMuhammad Usama <m.usama@gmail.com>
Mon, 6 Apr 2020 09:12:00 +0000 (14:12 +0500)
Fix contributed by: sherlockcpp <sherlockcpp@foxmail.com>

src/auth/pool_passwd.c

index a24eb9b628610fd7b533e08fc8ff9cdfbf600862..acf3fa9a5b5022d82fdddac4df2cf80c81849075 100644 (file)
@@ -388,7 +388,7 @@ pool_get_user_credentials(char *username)
                        char       *pwd;
 
                        t = getNextToken(t, &pwd);
-                       if (tok)
+                       if (pwd)
                        {
                                pwdMapping->backendUser.password = pwd;
                                pwdMapping->backendUser.userName = tok;