mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-20 19:14:38 +02:00
7017193: Small memory leak in get_stack_bounds os::create_stack_guard_pages
Getline() returns -1 but still allocate memory for str Reviewed-by: dcubed, coleenp
This commit is contained in:
parent
66a08540c2
commit
52bf12aead
3 changed files with 70 additions and 34 deletions
|
@ -658,6 +658,10 @@ class os: AllStatic {
|
|||
// Hook for os specific jvm options that we don't want to abort on seeing
|
||||
static bool obsolete_option(const JavaVMOption *option);
|
||||
|
||||
// Read file line by line. If line is longer than bsize,
|
||||
// rest of line is skipped. Returns number of bytes read or -1 on EOF
|
||||
static int get_line_chars(int fd, char *buf, const size_t bsize);
|
||||
|
||||
// Platform dependent stuff
|
||||
#ifdef TARGET_OS_FAMILY_linux
|
||||
# include "os_linux.hpp"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue