RFR: [8056310] Cleanup in WinNTFileSystem_md.c
Alan Bateman
Alan.Bateman at oracle.com
Fri Aug 29 11:21:59 UTC 2014
On 28/08/2014 23:28, Ivan Gerasimov wrote:
> Hello!
>
> This is a proposal to make some minor cleanup in WinNTFileSystem_md.c:
> - fix a typo in error message,
Looks okay.
> - use wide char constant for consistency,
Looks okay.
> - avoid an array reallocation for power-of-two sizes,
It's a bit of corner case but should okay. As some point we should just
get rid of this code completely and re-implement the list method to use
the new file system API.
> - avoid a very unlikely memory leak (when frompath != NULL && topath
> == NULL).
I checked the MSDN docs and free(NULL) is a no-op as it is elsewhere so
I think this is okay. Clearly if either is NULL then memory is
completely exhausted and the VM will likely crash/terminate anyway.
-Alan.
More information about the core-libs-dev
mailing list