RFR 8000203: file descriptor leak, src/solaris/native/java/net/net_util_md.c ... AND a potential realloc()-related memory leak.
Dmitry Samersoff
Dmitry.Samersoff at oracle.com
Wed Oct 24 10:46:19 PDT 2012
Kurchi.
On 2012-10-24 21:31, Kurchi Hazra wrote:
> Just for the sake of understanding the fix better, loRoutesTemp will
> point to 0 if the realloc() request fails,
> and we still need a reference to the older allocated memory (loRoutes in
> this case) in order to free it. Hence
> the need for a temporary variable here?
Correct.
realloc doesn't modify original pointer in case of file.
-Dmitry
>
> - Kurchi
>
>
> On 24.10.2012 06:27, Chris Hegarty wrote:
>> Looks good to me. Thanks for going the extra mile here.
>>
>> -Chris.
>>
>> On 24/10/2012 14:16, John Zavgren wrote:
>>>
>>> Greetings:
>>>
>>> I'm requesting a review of a software change that fixes a file
>>> descriptor leak AND a potential memory leak that involves memory
>>> reallocation (realloc()). The webrev image is in the following location:
>>>
>>> http://cr.openjdk.java.net/~chegar/8000203/webrev.01/
>>>
>>> Thanks!
>>> John Zavgren
>>> john.zavgren at oracle.com
>
--
Dmitry Samersoff
Java Hotspot development team, SPB04
* There will come soft rains ...
More information about the net-dev
mailing list