summaryrefslogtreecommitdiff
path: root/channels
diff options
context:
space:
mode:
Diffstat (limited to 'channels')
-rwxr-xr-xchannels/chan_sip.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index 07c8607fe..d7fe50010 100755
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -8158,6 +8158,13 @@ static char *func_header_read(struct ast_channel *chan, char *cmd, char *data, c
}
p = chan->tech_pvt;
+
+ /* If there is no private structure, this channel is no longer alive */
+ if (!p) {
+ ast_mutex_unlock(&chan->lock);
+ return NULL;
+ }
+
content = get_header(&p->initreq, data);
if (ast_strlen_zero(content)) {