summaryrefslogtreecommitdiff
path: root/channels/chan_sip.c
diff options
context:
space:
mode:
Diffstat (limited to 'channels/chan_sip.c')
-rw-r--r--channels/chan_sip.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index 097c55078..aa6813fd3 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -18569,6 +18569,11 @@ static int get_sip_pvt_from_replaces(const char *callid, const char *totag,
}
}
+ if (!sip_pvt_ptr) {
+ /* return error if sip_pvt was not found */
+ return -1;
+ }
+
/* If we're here sip_pvt_ptr has been copied to *out_pvt, prevent RAII_VAR cleanup */
sip_pvt_ptr = NULL;