]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
don't pass null to switch_loadable_module_get_api_interface. Found by Klockwork ...
authorMichael Jerris <mike@jerris.com>
Fri, 16 May 2008 16:15:37 +0000 (16:15 +0000)
committerMichael Jerris <mike@jerris.com>
Fri, 16 May 2008 16:15:37 +0000 (16:15 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@8439 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/switch_loadable_module.c

index 1c64030933539aa1bf06ea6a2ea36ac032d2f443..d592a35da65c0cef48e107144fe77dde68dc4432 100644 (file)
@@ -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;