Fix resource leak in pcre2test introduced by recent patch.
This commit is contained in:
parent
8057c3c8b9
commit
f988433788
|
@ -5083,18 +5083,19 @@ switch(cmd)
|
|||
{
|
||||
(void)PCRE2_CONFIG(PCRE2_CONFIG_TABLES_LENGTH, &loadtables_length);
|
||||
tables3 = malloc(loadtables_length);
|
||||
}
|
||||
|
||||
if (tables3 == NULL)
|
||||
{
|
||||
fprintf(outfile, "** Failed: malloc failed for #loadtables\n");
|
||||
return PR_ABEND;
|
||||
yield = PR_ABEND;
|
||||
}
|
||||
}
|
||||
|
||||
if (fread(tables3, 1, loadtables_length, f) != loadtables_length)
|
||||
else if (fread(tables3, 1, loadtables_length, f) != loadtables_length)
|
||||
{
|
||||
fprintf(outfile, "** Wrong return from fread()\n");
|
||||
yield = PR_ABEND;
|
||||
}
|
||||
|
||||
fclose(f);
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue