From c8f8d6b964a77180ed20a18c59cc91d892ff0e2d Mon Sep 17 00:00:00 2001 From: William King Date: Thu, 29 Jan 2015 15:20:10 -0600 Subject: [PATCH] Fix a null pointer dereference in the native postgresql connection code. This is unlikely to ever be hit in the field. --- src/switch_pgsql.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/switch_pgsql.c b/src/switch_pgsql.c index 74eea5cb8e..4d955f1f45 100644 --- a/src/switch_pgsql.c +++ b/src/switch_pgsql.c @@ -525,7 +525,7 @@ SWITCH_DECLARE(switch_pgsql_status_t) switch_pgsql_handle_exec_string_detailed(c goto error; } - if (!result) { + if (result) { switch (result->status) { #if POSTGRESQL_MAJOR_VERSION >= 9 && POSTGRESQL_MINOR_VERSION >= 2 case PGRES_SINGLE_TUPLE: