summaryrefslogtreecommitdiff
path: root/channels
diff options
context:
space:
mode:
authorMark Michelson <mmichelson@digium.com>2015-01-30 16:49:59 +0000
committerMark Michelson <mmichelson@digium.com>2015-01-30 16:49:59 +0000
commitbd0bdf1e41c52afb6dbf262d60a8ed02d2110fcd (patch)
tree8f6b06aedf21985ef4c0b3ca1b21ea7e56319bfa /channels
parent388d691f34d7cfcb77130965bf8709eee4b692c1 (diff)
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 ........ Merged revisions 431468 from http://svn.asterisk.org/svn/asterisk/branches/13 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@431469 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels')
-rw-r--r--channels/chan_pjsip.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/channels/chan_pjsip.c b/channels/chan_pjsip.c
index 06828ac60..3e2e9e22e 100644
--- a/channels/chan_pjsip.c
+++ b/channels/chan_pjsip.c
@@ -2107,7 +2107,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 */
@@ -2115,6 +2115,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;