]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
CID:1024270 Dereference before null check
authorMichael Jerris <mike@jerris.com>
Fri, 16 May 2014 18:54:43 +0000 (18:54 +0000)
committerMichael Jerris <mike@jerris.com>
Fri, 16 May 2014 18:54:50 +0000 (18:54 +0000)
src/mod/applications/mod_commands/mod_commands.c

index 786115d115119d24ceac4a84e2a6e6dce76d123b..b4d72d95c7a1efb920a470b750a2b5f99988f701 100644 (file)
@@ -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;
 }