mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
Plug a memory leak.
Obtained from: DragonFlyBSD (commit 5119ece) MFC after: 2 weeks
This commit is contained in:
parent
bbd01a4100
commit
cfbebadc60
1 changed files with 3 additions and 1 deletions
|
|
@ -1716,8 +1716,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 */
|
||||
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++)
|
||||
|
|
|
|||
Loading…
Reference in a new issue