Skip to content

Commit aa90df6

Browse files
Wang HuangSun Jianye
authored andcommitted
8266187: Memory leak in appendBootClassPath()
Co-authored-by: Wang Huang <whuang@openjdk.org> Co-authored-by: Sun Jianye <sunjianye@huawei.com> Reviewed-by: kevinw, mli, alanb
1 parent b651904 commit aa90df6

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/java.instrument/share/native/libinstrument/InvocationAdapter.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2003, 2019, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2003, 2021, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -949,6 +949,7 @@ appendBootClassPath( JPLISAgent* agent,
949949

950950
resolved = resolve(parent, path);
951951
jvmtierr = (*jvmtienv)->AddToBootstrapClassLoaderSearch(jvmtienv, resolved);
952+
free(resolved);
952953
}
953954

954955
/* print warning if boot class path not updated */

0 commit comments

Comments
 (0)