]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
Fix a null pointer dereference in the native postgresql connection
authorWilliam King <william.king@quentustech.com>
Thu, 29 Jan 2015 21:20:10 +0000 (15:20 -0600)
committerWilliam King <william.king@quentustech.com>
Thu, 29 Jan 2015 21:20:10 +0000 (15:20 -0600)
code. This is unlikely to ever be hit in the field.

src/switch_pgsql.c

index 74eea5cb8eec99227899b5f583b02a5371e6febd..4d955f1f45ae74afe60c2adc8153e86317630b41 100644 (file)
@@ -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: