From: Anthony Minessale Date: Mon, 25 Feb 2008 19:45:07 +0000 (+0000) Subject: fix logic err in user channel X-Git-Tag: v1.0-rc1~205 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=154f8f9f8c97455f608cae4e6c69587455b2daaa;p=thirdparty%2Ffreeswitch.git fix logic err in user channel git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@7735 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- diff --git a/src/mod/applications/mod_dptools/mod_dptools.c b/src/mod/applications/mod_dptools/mod_dptools.c index 4c68dfd6d9..f06710a8c8 100644 --- a/src/mod/applications/mod_dptools/mod_dptools.c +++ b/src/mod/applications/mod_dptools/mod_dptools.c @@ -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(¶ms); + if (params) { + switch_event_destroy(¶ms); + } switch_safe_free(user);