]> granicus.if.org Git - pgbouncer/commitdiff
hba: Skip unparseable lines, keep parsing to the end.
authorMarko Kreen <markokr@gmail.com>
Mon, 14 Mar 2016 10:09:07 +0000 (12:09 +0200)
committerMarko Kreen <markokr@gmail.com>
Mon, 14 Mar 2016 10:10:17 +0000 (12:10 +0200)
Rejecting whole HBA file on failure seems bad usability.

Show warning but keep parsing.

Fixes #118

src/hba.c

index dade1d8978d1511cf4dfe8d486aa51a57e068387..70e187ffc937c102068ae9fd3190f530137d1f28 100644 (file)
--- a/src/hba.c
+++ b/src/hba.c
@@ -629,9 +629,8 @@ struct HBA *hba_load_rules(const char *fn)
                        break;
                parse_from_string(&tp, ln);
                if (!parse_line(hba, &tp, linenr, fn)) {
-                       free(hba);
-                       hba = NULL;
-                       break;
+                       /* Ignore line, but parse to the end. */
+                       continue;
                }
        }
 out: