From: Michael Jerris Date: Fri, 16 May 2014 18:54:43 +0000 (+0000) Subject: CID:1024270 Dereference before null check X-Git-Tag: v1.4.4~40 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=9b1ebff8de8884656192f34a065c335bc77e1c2b;p=thirdparty%2Ffreeswitch.git CID:1024270 Dereference before null check --- diff --git a/src/mod/applications/mod_commands/mod_commands.c b/src/mod/applications/mod_commands/mod_commands.c index 786115d115..b4d72d95c7 100644 --- a/src/mod/applications/mod_commands/mod_commands.c +++ b/src/mod/applications/mod_commands/mod_commands.c @@ -120,10 +120,7 @@ static switch_status_t select_url(const char *user, } switch_safe_free(sql); - - if (db) { - switch_cache_db_release_db_handle(&db); - } + switch_cache_db_release_db_handle(&db); return SWITCH_STATUS_SUCCESS; } @@ -5167,10 +5164,7 @@ SWITCH_STANDARD_API(show_function) end: switch_safe_free(mydata); - - if (db) { - switch_cache_db_release_db_handle(&db); - } + switch_cache_db_release_db_handle(&db); return status; }