]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
Possible leak if someone were to try and add extra headers to a channel that had...
authorWilliam King <william.king@quentustech.com>
Sun, 19 May 2013 00:00:41 +0000 (17:00 -0700)
committerWilliam King <william.king@quentustech.com>
Sun, 19 May 2013 00:01:27 +0000 (17:01 -0700)
src/mod/endpoints/mod_sofia/mod_sofia.c

index a53f1d5d1048eed95320eedae0a71e3153afce6f..4a0d72fcff604d56ade5d4dc905dea3cee2266aa 100644 (file)
@@ -2276,6 +2276,8 @@ static switch_status_t sofia_receive_message(switch_core_session_t *session, swi
                                                 TAG_IF(!zstr(tech_pvt->user_via), SIPTAG_VIA_STR(tech_pvt->user_via)), 
                                                 TAG_IF(pl, SIPTAG_PAYLOAD_STR(pl)),
                                                 TAG_END());
+
+                               switch_safe_free(headers);
                        } else {
                                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "%s send_info is not supported.\n", switch_channel_get_name(channel));
                        }
@@ -2605,6 +2607,7 @@ static switch_status_t sofia_receive_message(switch_core_session_t *session, swi
                                msg->string_reply = "no reply";
                        }
                        switch_channel_hangup(tech_pvt->channel, SWITCH_CAUSE_BLIND_TRANSFER);
+                       switch_safe_free(extra_headers);
                }
                break;