COVERITY: Forward NULL: CID:40
authorNelson Ferreira <nelson.ferreira@ieee.org>
Thu, 12 Jan 2012 03:46:37 +0000 (22:46 -0500)
committerNelson Ferreira <nelson.ferreira@ieee.org>
Thu, 12 Jan 2012 03:46:37 +0000 (22:46 -0500)
* lib-src/ootags.c (analyse_regex): Return if regex_arg is NULL

Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
lib-src/ootags.c

index c2b6151..6433c92 100644 (file)
@@ -4599,9 +4599,10 @@ char *name;
 void analyse_regex(regex_arg)
 char *regex_arg;
 {
-       if (regex_arg == NULL)
+       if (regex_arg == NULL) {
                free_patterns();        /* --no-regex: remove existing regexps */
-
+               return;
+       }
        /* A real --regexp option or a line in a regexp file. */
        switch (regex_arg[0]) {
                /* Comments in regexp file or null arg to --regex. */