On Thu, 27 Jul 2023 13:42:43 GMT, Sergey Tsypanov <stsypa...@openjdk.org> wrote:

>> Brian Burkhalter has updated the pull request incrementally with three 
>> additional commits since the last revision:
>> 
>>  - 6478546: Decrease malloc limit to 1.5 MB
>>  - 6478546: Minor refactoring
>>  - 6478546: Prevent short read
>
> src/java.base/share/native/libjava/io_util.c line 199:
> 
>> 197:     }
>> 198: 
>> 199:     if (buf != stackBuf)
> 
> Wouldn't this cause a leak when if-condition is not met and `free(buf)` is 
> not called?

I don't see how this is possible. The value of `buf` is either `stackBuf` or a 
value returned by `malloc()`. In any case, this code will be superseded.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/14981#discussion_r1276493893

Reply via email to