]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
Fix segfault if no arg has been specified, there is still some other issue lurking...
authorStefan Knoblich <stkn@freeswitch.org>
Fri, 9 May 2008 09:08:32 +0000 (09:08 +0000)
committerStefan Knoblich <stkn@freeswitch.org>
Fri, 9 May 2008 09:08:32 +0000 (09:08 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@8327 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/mod/languages/mod_lua/freeswitch_lua.cpp

index 65a76768e230fb86ca11108f8e44d0c698ad5b8f..93c3138ba086f5e581dfd1fd00907f18ac579451 100644 (file)
@@ -130,7 +130,9 @@ void Session::setHangupHook(char *func, char *arg) {
        
        if (func) {
                hangup_func_str = strdup(func);
-               hangup_func_arg = strdup(arg);
+               if (arg) {
+                       hangup_func_arg = strdup(arg);
+               }
                switch_channel_set_private(channel, "CoreSession", this);
                hook_state = switch_channel_get_state(channel);
                switch_core_event_hook_add_state_change(session, lua_hanguphook);