]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
null out pointer on failed read lock
authorAnthony Minessale <anthony.minessale@gmail.com>
Mon, 6 Apr 2009 21:01:14 +0000 (21:01 +0000)
committerAnthony Minessale <anthony.minessale@gmail.com>
Mon, 6 Apr 2009 21:01:14 +0000 (21:01 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@12925 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/mod/endpoints/mod_loopback/mod_loopback.c

index 21dcbf1aa8f7254b5a9662a45291bde342705b99..f3d6809097770825e9489f8808bd01ad6546b02f 100644 (file)
@@ -267,6 +267,7 @@ static switch_status_t channel_on_init(switch_core_session_t *session)
        
        if (tech_pvt->other_session) {
                if (switch_core_session_read_lock(tech_pvt->other_session) != SWITCH_STATUS_SUCCESS) {
+                       tech_pvt->other_session = NULL;
                        switch_channel_hangup(channel, SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER);
                        goto end;
                }