diff options
author | Richard Mudgett <rmudgett@digium.com> | 2012-05-31 18:39:30 +0000 |
---|---|---|
committer | Richard Mudgett <rmudgett@digium.com> | 2012-05-31 18:39:30 +0000 |
commit | dd2427c1414d62cd7e3c867f17de9d6dbac844fe (patch) | |
tree | 5760fb673e236d0f58b094240de81ca9780cd135 /res/ael | |
parent | fdb002a43a819542693815767a0ca9aba135f18c (diff) |
Coverity Report: Fix issues for error type REVERSE_INULL (core modules)
* Fixes findings: 0-2,5,7-15,24-26,28-31
(issue ASTERISK-19648)
Reported by: Matt Jordan
........
Merged revisions 368039 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
Merged revisions 368042 from http://svn.asterisk.org/svn/asterisk/branches/10
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@368052 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'res/ael')
-rw-r--r-- | res/ael/pval.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/res/ael/pval.c b/res/ael/pval.c index 9c557df2b..327dbffc7 100644 --- a/res/ael/pval.c +++ b/res/ael/pval.c @@ -1223,21 +1223,24 @@ static pval *get_goto_target(pval *item) return x; } } - return 0; + return NULL; } static void check_goto(pval *item) { + if (!item->u1.list) { + return; + } + /* check for the target of the goto-- does it exist? */ if ( !(item->u1.list)->next && !(item->u1.list)->u1.str ) { ast_log(LOG_ERROR,"Error: file %s, line %d-%d: goto: empty label reference found!\n", item->filename, item->startline, item->endline); errs++; } - + /* just one item-- the label should be in the current extension */ - - if (item->u1.list && !item->u1.list->next && !strstr((item->u1.list)->u1.str,"${")) { + if (!item->u1.list->next && !strstr(item->u1.list->u1.str,"${")) { struct pval *z = get_extension_or_contxt(item); struct pval *x = 0; if (z) |