* regex/regcomp.c (computematchjumps): Free local memory in case of

error (CID 59975).
This commit is contained in:
Corinna Vinschen 2014-06-23 14:33:55 +00:00
parent f83cc3b7e9
commit 565e3643dd
2 changed files with 8 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2014-06-23 Corinna Vinschen <corinna@vinschen.de>
* regex/regcomp.c (computematchjumps): Free local memory in case of
error (CID 59975).
2014-06-23 Corinna Vinschen <corinna@vinschen.de>
* mount.cc (fs_info::update): Define dir in the outermost scope to avoid

View File

@ -1803,7 +1803,10 @@ computematchjumps(struct parse *p, struct re_guts *g)
g->matchjump = (int*) malloc(g->mlen * sizeof(unsigned int));
if (g->matchjump == NULL) /* Not a fatal error */
{
free (pmatches);
return;
}
/* Set maximum possible jump for each character in the pattern */
for (mindex = 0; mindex < g->mlen; mindex++)