Fix memory leak.
authorTatsuo Ishii <ishii@postgresql.org>
Sun, 24 Jun 2018 00:59:06 +0000 (09:59 +0900)
committerTatsuo Ishii <ishii@postgresql.org>
Sun, 24 Jun 2018 00:59:06 +0000 (09:59 +0900)
Per Coverity.

src/auth/pool_hba.c

index 7d9a7b96f844e87282e2e0c068a03dbf602bbf1a..dd398db55f711835dd8ed2a1d81c93f6320e1455 100644 (file)
@@ -663,8 +663,11 @@ parse_hba_line(TokenizedLine *tok_line, int elevel)
 
                        *val++ = '\0';          /* str now holds "name", val holds "value" */
                        if (!parse_hba_auth_opt(str, val, parsedline, elevel, err_msg))
+                       {
                        /* parse_hba_auth_opt already logged the error message */
+                               pfree(str);
                                return NULL;
+                       }
                        pfree(str);
                }
        }