Integrated: 8273575: memory leak in appendBootClassPath(), paths must be deallocated

Serguei Spitsyn sspitsyn at openjdk.java.net
Wed Sep 15 20:06:57 UTC 2021


On Wed, 15 Sep 2021 01:05:10 GMT, Serguei Spitsyn <sspitsyn at openjdk.org> wrote:

> The memory allocated and hold in the paths local variable of function appendBootClassPath() is never deallocated:
>     splitPathList(pathList, &count, &paths);
> So, it is a memory leak which needs to be fixed.
> The fix is to add one line at the end of function: 
>     free(paths);

This pull request has now been integrated.

Changeset: 74ffe122
Author:    Serguei Spitsyn <sspitsyn at openjdk.org>
URL:       https://git.openjdk.java.net/jdk/commit/74ffe12267cb3ae63072a06f50083fd0352d8049
Stats:     1 line in 1 file changed: 1 ins; 0 del; 0 mod

8273575: memory leak in appendBootClassPath(), paths must be deallocated

Reviewed-by: dholmes, amenkov

-------------

PR: https://git.openjdk.java.net/jdk/pull/5516


More information about the serviceability-dev mailing list