From: William King Date: Thu, 29 Jan 2015 21:20:10 +0000 (-0600) Subject: Fix a null pointer dereference in the native postgresql connection X-Git-Tag: v1.4.17~1^2~55 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c8f8d6b964a77180ed20a18c59cc91d892ff0e2d;p=thirdparty%2Ffreeswitch.git Fix a null pointer dereference in the native postgresql connection code. This is unlikely to ever be hit in the field. --- 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: