"Erich E. Hoover" erich.e.hoover@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:
- Make these routines always safe to free (and always free them)
- 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.