From: Marko Kreen Date: Tue, 20 Nov 2007 08:34:15 +0000 (+0000) Subject: param value can be NULL during restart from 1.0.8 X-Git-Tag: pgbouncer_1_2_rc2~129 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a180ad98944aa0754e49567f208f3592562a2321;p=pgbouncer param value can be NULL during restart from 1.0.8 --- diff --git a/src/varcache.c b/src/varcache.c index b359351..8120436 100644 --- a/src/varcache.c +++ b/src/varcache.c @@ -47,6 +47,10 @@ bool varcache_set(VarCache *cache, const char *key, const char *value) char *pos; const struct var_lookup *lk; + /* convert NULL to empty string */ + if (value == NULL) + value = ""; + for (lk = lookup; lk->name; lk++) { if (strcasecmp(lk->name, key) != 0) continue;