libertyIncludeBegin leak

Signed-off-by: James Cherry <cherry@parallaxsw.com>
This commit is contained in:
James Cherry 2022-01-27 10:46:47 -07:00
parent b4b8abd9d8
commit 9938bf7b94
1 changed files with 5 additions and 2 deletions

View File

@ -546,8 +546,11 @@ libertyIncludeBegin(const char *filename)
liberty_filename = filename;
liberty_line = 1;
}
else
libertyParseError("cannot open include file %s.", filename);
else {
string file(filename);
stringDelete(filename);
libertyParseError("cannot open include file %s.", file.c_str());
}
}
void