8255845: Memory leak in imageFile.cpp

Reviewed-by: jlaskey, sundar
This commit is contained in:
Evan Whelan 2020-12-03 15:28:42 +00:00 committed by Jim Laskey
parent fa58671f9f
commit 66a2e70985

View file

@ -178,8 +178,8 @@ const char* ImageModuleData::package_to_module(const char* package_name) {
// retrieve package location
ImageLocation location;
bool found = _image_file->find_location(path, location);
delete[] path;
if (!found) {
delete[] path;
return NULL;
}