From: Peter Eisentraut Date: Tue, 11 Sep 2018 10:30:53 +0000 (+0200) Subject: Fix rare crash X-Git-Tag: pgbouncer_1_10_0~27 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7b97cb8d70b86a15c4517bff6b9ee03392a4cecd;p=pgbouncer Fix rare crash SHOW FDS could in rare cases crash if a client had not been assigned to a pool yet, causing a null pointer dereference. fixes #311 --- diff --git a/src/admin.c b/src/admin.c index 735b79f..ba09eb5 100644 --- a/src/admin.c +++ b/src/admin.c @@ -330,7 +330,7 @@ static bool show_one_fd(PgSocket *admin, PgSocket *sk) if (!mbuf_get_uint64be(&tmp, &ckey)) return false; - if (sk->pool->db->auth_user && sk->auth_user && !find_user(sk->auth_user->name)) + if (sk->pool && sk->pool->db->auth_user && sk->auth_user && !find_user(sk->auth_user->name)) password = sk->auth_user->passwd; /* PAM requires passwords as well since they are not stored externally */