From: Michael Jerris Date: Fri, 16 May 2008 16:15:37 +0000 (+0000) Subject: don't pass null to switch_loadable_module_get_api_interface. Found by Klockwork ... X-Git-Tag: v1.0-rc6~61 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=41510454a8cb65b62b98a30bf5512416d1c7217f;p=thirdparty%2Ffreeswitch.git don't pass null to switch_loadable_module_get_api_interface. Found by Klockwork (www.klocwork.com) git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@8439 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- diff --git a/src/switch_loadable_module.c b/src/switch_loadable_module.c index 1c64030933..d592a35da6 100644 --- a/src/switch_loadable_module.c +++ b/src/switch_loadable_module.c @@ -1349,7 +1349,7 @@ SWITCH_DECLARE(switch_status_t) switch_api_execute(const char *cmd, const char * } } - if ((api = switch_loadable_module_get_api_interface(cmd)) != 0) { + if (cmd && (api = switch_loadable_module_get_api_interface(cmd)) != 0) { status = api->function(arg, session, stream); } else { status = SWITCH_STATUS_FALSE;