[PATCH 1/11] ntdll: Make nt_to_unix_file_name_attr return always safe to free.

Alexandre Julliard julliard at winehq.org
Tue Sep 9 03:46:28 CDT 2014

"Erich E. Hoover" <erich.e.hoover at gmail.com> writes:

> While working on an upcoming patch set I discovered that several of
> the file handling primitives are not safe to free under all
> circumstances.  This would not normally be a problem (since a
> comparison can usually be made against STATUS_SUCCESS).  However,
> there are several cases where this comparison is insufficient (mostly
> when STATUS_NO_SUCH_FILE occurs).  There are two ways to solve this
> problem:
> 1) Make these routines always safe to free (and always free them)
> 2) Specifically add checks for STATUS_NO_SUCH_FILE and free all these
> cases manually

STATUS_NO_SUCH_FILE returning a valid string only happens when trying to
create the file or things like that, not for normal opens, so most of
your changes are unnecessary.

Alexandre Julliard
julliard at winehq.org

More information about the wine-devel mailing list