diff options
author | snuffy <snuffy22@gmail.com> | 2015-05-15 13:05:52 +1000 |
---|---|---|
committer | Joshua Colp <jcolp@digium.com> | 2015-05-17 07:44:00 -0500 |
commit | f9114179e6bc727cd9fe593d50313c19b6e63492 (patch) | |
tree | 9e2626cb2b622743a95a34a581d99de25d683bf6 /channels | |
parent | dd78ab42e4316c53fa517ca19956d9be38f368a5 (diff) |
chan_pjsip: Fix crash during off-nominal when no endpoint specified.
Add missing return -1 when no endpoint name is specified.
ASTERISK-25086 #close
Reported by: snuffy
Change-Id: I9de76c2935a1f4e3f0cffe97a670106f5605e89e
Diffstat (limited to 'channels')
-rw-r--r-- | channels/chan_pjsip.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/channels/chan_pjsip.c b/channels/chan_pjsip.c index c111cf1d3..b7d7065f2 100644 --- a/channels/chan_pjsip.c +++ b/channels/chan_pjsip.c @@ -1815,6 +1815,7 @@ static int request(void *obj) if (ast_strlen_zero(endpoint_name)) { ast_log(LOG_ERROR, "Unable to create PJSIP channel with empty endpoint name\n"); req_data->cause = AST_CAUSE_CHANNEL_UNACCEPTABLE; + return -1; } else if (!(endpoint = ast_sorcery_retrieve_by_id(ast_sip_get_sorcery(), "endpoint", endpoint_name))) { ast_log(LOG_ERROR, "Unable to create PJSIP channel - endpoint '%s' was not found\n", endpoint_name); req_data->cause = AST_CAUSE_NO_ROUTE_DESTINATION; |