From: Mike Jerris Date: Thu, 29 Jun 2017 18:21:07 +0000 (-0500) Subject: FS-10439: [mod_sofia] fix small leak when receiving REFER message X-Git-Tag: v1.6.19~18 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=67e7f6644572d3e6f96faf69a1542d9ca93b73de;p=thirdparty%2Ffreeswitch.git FS-10439: [mod_sofia] fix small leak when receiving REFER message --- diff --git a/src/mod/endpoints/mod_sofia/sofia.c b/src/mod/endpoints/mod_sofia/sofia.c index 5a3deb1f2d..399cef3ca9 100644 --- a/src/mod/endpoints/mod_sofia/sofia.c +++ b/src/mod/endpoints/mod_sofia/sofia.c @@ -8460,6 +8460,9 @@ void sofia_handle_sip_i_refer(nua_t *nua, sofia_profile_t *profile, nua_handle_t goto done; } + home = su_home_new(sizeof(*home)); + switch_assert(home != NULL); + if ((refer_to = sip->sip_refer_to)) { full_ref_to = sip_header_as_string(home, (void *) sip->sip_refer_to); } @@ -8479,9 +8482,6 @@ void sofia_handle_sip_i_refer(nua_t *nua, sofia_profile_t *profile, nua_handle_t from = sip->sip_from; //to = sip->sip_to; - home = su_home_new(sizeof(*home)); - switch_assert(home != NULL); - nua_respond(nh, SIP_202_ACCEPTED, NUTAG_WITH_THIS_MSG(de->data->e_msg), SIPTAG_EXPIRES_STR("60"), TAG_END());