[XS] RFR: 8209994: windows: Java_java_net_NetworkInterface_getAll misses releasing interface-list

Volker Simonis volker.simonis at gmail.com
Mon Aug 27 15:37:37 UTC 2018


Hi Matthias,

the change looks good but I think you should also initialize 'ifList'
in 'Java_java_net_NetworkInterface_getAll()' with NULL otherwise its
value is undefined and if 'enumInterfaces()' returns with an error
without assigning 'ifList' you may end up calling 'free_netif()' with
an undefined, non-NULL value.

Best regards,
Volker

On Mon, Aug 27, 2018 at 5:13 PM Baesken, Matthias
<matthias.baesken at sap.com> wrote:
>
> Hello,  please  review this small fix ;
>
>
>
> When returning from  Java_java_net_NetworkInterface_getAll   (windows version), we have to  free resources to avoid leaks.
>
> In some special  cases this is not done .
>
>
>
>
>
> Bug :
>
>
>
> https://bugs.openjdk.java.net/browse/JDK-8209994
>
>
>
> change :
>
>
>
> http://cr.openjdk.java.net/~mbaesken/webrevs/8209994/
>
>
>
>
>
>
>
> Thanks, Matthias


More information about the net-dev mailing list