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

Erich E. Hoover erich.e.hoover at gmail.com
Mon Sep 8 14:41:34 CDT 2014


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

This patch series chooses the first option, both for simplicity and in
order to prevent future mistakes arising from these routines.

This patch:
Make the ANSI string return of nt_to_unix_file_name_attr always safe
to free with RtlFreeAnsiString.  Needed by patch 4, 5, and 8.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-ntdll-Make-nt_to_unix_file_name_attr-return-always-s.patch
Type: text/x-diff
Size: 887 bytes
Desc: not available
URL: <http://www.winehq.org/pipermail/wine-patches/attachments/20140908/0f01278e/attachment.patch>


More information about the wine-patches mailing list