Skip to content
This repository was archived by the owner on Feb 2, 2023. It is now read-only.

Commit 9caa290

Browse files
author
Yuri Nesterenko
committed
8255845: Memory leak in imageFile.cpp
Backport-of: 66a2e70985fcdb8e0b91b05fbeae825db6ae9c78
1 parent d79cd94 commit 9caa290

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/java.base/share/native/libjimage/imageFile.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,8 +178,8 @@ const char* ImageModuleData::package_to_module(const char* package_name) {
178178
// retrieve package location
179179
ImageLocation location;
180180
bool found = _image_file->find_location(path, location);
181+
delete[] path;
181182
if (!found) {
182-
delete[] path;
183183
return NULL;
184184
}
185185

0 commit comments

Comments
 (0)