* regex/regcomp.c (computematchjumps): Free local memory in case of
error (CID 59975).
This commit is contained in:
@@ -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++)
|
||||
|
Reference in New Issue
Block a user