diff options
author | Kinsey Moore <kmoore@digium.com> | 2012-05-04 22:17:38 +0000 |
---|---|---|
committer | Kinsey Moore <kmoore@digium.com> | 2012-05-04 22:17:38 +0000 |
commit | 781f4657b91d6c8fa3dcf3bc9f0daaad5155506e (patch) | |
tree | 02eb58c52c581367e9fb47d8de1c633b2b094030 /apps/app_voicemail.c | |
parent | 8842f76a7f486cd3d223a2c28ace91fcab5e8a12 (diff) |
Fix many issues from the NULL_RETURNS Coverity report
Most of the changes here are trivial NULL checks. There are a couple
optimizations to remove the need to check for NULL and outboundproxy parsing
in chan_sip.c was rewritten to avoid use of strtok. Additionally, a bug was
found and fixed with the parsing of outboundproxy when "outboundproxy=," was
set.
(Closes issue ASTERISK-19654)
........
Merged revisions 365398 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
Merged revisions 365399 from http://svn.asterisk.org/svn/asterisk/branches/10
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@365400 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'apps/app_voicemail.c')
-rw-r--r-- | apps/app_voicemail.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c index 0f9cad5d8..54b199a0b 100644 --- a/apps/app_voicemail.c +++ b/apps/app_voicemail.c @@ -11724,6 +11724,10 @@ static void mwi_unsub_event_cb(const struct ast_event *event, void *userdata) if (ast_event_get_ie_uint(event, AST_EVENT_IE_EVENTTYPE) != AST_EVENT_MWI) return; + if (!uniqueid) { + ast_log(LOG_ERROR, "Unable to allocate memory for uniqueid\n"); + return; + } u = ast_event_get_ie_uint(event, AST_EVENT_IE_UNIQUEID); *uniqueid = u; if (ast_taskprocessor_push(mwi_subscription_tps, handle_unsubscribe, uniqueid) < 0) { |