]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
fix logic err in user channel
authorAnthony Minessale <anthony.minessale@gmail.com>
Mon, 25 Feb 2008 19:45:07 +0000 (19:45 +0000)
committerAnthony Minessale <anthony.minessale@gmail.com>
Mon, 25 Feb 2008 19:45:07 +0000 (19:45 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@7735 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/mod/applications/mod_dptools/mod_dptools.c

index 4c68dfd6d94c5b040293afc1440d0fec0f071459..f06710a8c80e63acab3ada003b3210aa8a1b6ca6 100644 (file)
@@ -1337,7 +1337,7 @@ static switch_call_cause_t user_outgoing_channel(switch_core_session_t *session,
        static switch_call_cause_t cause = SWITCH_CAUSE_UNALLOCATED;
        unsigned int timelimit = 60;
        switch_channel_t *new_channel = NULL;
-       switch_event_t *params;
+       switch_event_t *params = NULL;
        if (switch_strlen_zero(outbound_profile->destination_number)) {
                goto done;
        }
@@ -1452,7 +1452,9 @@ static switch_call_cause_t user_outgoing_channel(switch_core_session_t *session,
                switch_xml_free(xml);
        }
        
-       switch_event_destroy(&params);
+       if (params) {
+               switch_event_destroy(&params);
+       }
 
        switch_safe_free(user);