Fix some memory leaks.

These memory leaks were found and fixed by John Hardin. I'm just
committing them for him.

ASTERISK-24736 #close
Reported by Mark Michelson

Review: https://reviewboard.asterisk.org/r/4389



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@431468 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Mark Michelson
2015-01-30 16:47:50 +00:00
parent f7d23dfcc6
commit 43dd42d8ae
8 changed files with 23 additions and 16 deletions

View File

@@ -2058,7 +2058,7 @@ static int chan_pjsip_incoming_request(struct ast_sip_session *session, struct p
static int call_pickup_incoming_request(struct ast_sip_session *session, pjsip_rx_data *rdata)
{
struct ast_features_pickup_config *pickup_cfg = ast_get_chan_features_pickup_config(session->channel);
struct ast_features_pickup_config *pickup_cfg;
struct ast_channel *chan;
/* We don't care about reinvites */
@@ -2066,6 +2066,7 @@ static int call_pickup_incoming_request(struct ast_sip_session *session, pjsip_r
return 0;
}
pickup_cfg = ast_get_chan_features_pickup_config(session->channel);
if (!pickup_cfg) {
ast_log(LOG_ERROR, "Unable to retrieve pickup configuration options. Unable to detect call pickup extension.\n");
return 0;