summaryrefslogtreecommitdiff
path: root/channels
diff options
context:
space:
mode:
authorJoshua Colp <jcolp@digium.com>2018-01-11 13:05:05 -0500
committerCorey Farrell <git@cfware.com>2018-01-11 13:05:05 -0500
commit6d5f4768a4f1e50099201b22948926f957ee715c (patch)
treea17daa45a9e031b297e5db588613715622819772 /channels
parent8a6febd9802d2545556fca90519d2d1a793a1357 (diff)
chan_sip: Check that an iostream exists before accessing.
Before getting the file descriptor for an iostream check that it is present. ASTERISK-27534 Change-Id: Ie0aa1394007a37c30e337ea1176a6fb3a63bc99c
Diffstat (limited to 'channels')
-rw-r--r--channels/chan_sip.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index e204f0053..e8cc591a3 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -29450,7 +29450,7 @@ static int sip_prepare_socket(struct sip_pvt *p)
return s->fd;
}
if ((s->type & (AST_TRANSPORT_TCP | AST_TRANSPORT_TLS)) &&
- s->tcptls_session) {
+ s->tcptls_session && s->tcptls_session->stream) {
return ast_iostream_get_fd(s->tcptls_session->stream);
}
if ((s->type & (AST_TRANSPORT_WS | AST_TRANSPORT_WSS))) {