1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2026-01-06 09:41:07 +01:00

26362: avoid calling regfree() on uninitialized regex_t.

This commit is contained in:
Wayne Davison 2009-01-19 08:26:21 +00:00
parent 36375b5911
commit e2b9d8d181
2 changed files with 12 additions and 6 deletions

View file

@ -1,9 +1,15 @@
2009-01-19 Wayne Davison <wayned@users.sourceforge.net>
* unposted: fixed compiler warnings in zcond_regex_match(),
including a (useless) warning about matchessz potentially
being used uninitialized, some signed/unsigned warnings
about re.re_nsub. Split a couple compound lines too.
* 26362: Src/Modules/regex.c: avoid calling regfree() when the
regex_t "re" was not initialized.
2009-01-19 Wayne Davison <wayned@users.sourceforge.net>
* unposted: Src/Modules/regex.c: fixed a few compiler warnings
in zcond_regex_match(), including a (useless) warning about
matchessz potentially being used uninitialized and some
signed/unsigned warnings about re.re_nsub. Also split a
couple compound lines.
2009-01-19 Doug Kearns <dougkearns@gmail.com>
@ -10937,5 +10943,5 @@
*****************************************************
* This is used by the shell to define $ZSH_PATCHLEVEL
* $Revision: 1.4515 $
* $Revision: 1.4516 $
*****************************************************

View file

@ -120,7 +120,7 @@ zcond_regex_match(char **a, int id)
break;
default:
DPUTS(1, "bad regex option");
break;
return 0; /* nothing to cleanup, especially not "re". */
}
if (matches)