forked from reactos/reactos
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FREELDR] fs.c: Minor refactoring in ArcOpen(); fix a memory leak (re…
…actos#7385) - `ArcOpen()`: flatten the registered-device search for-loop. Limit it to just the device search, and exit early. The rest of the initialization is now done outside the loop. - The `DeviceName` string pointer may have been allocated from the heap, for path normalization (see `NormalizeArcDeviceName()`). This pointer is then only used in the device search loop and not nused anymore afterwards. The old code didn't free this pointer and memory could leak. This is now fixed easily, thanks to the loop flattening. - Rename `DEVICE` member `Prefix` to `DeviceName`; SAL-annotate `FsRegisterDevice()`.
- Loading branch information
Showing
2 changed files
with
77 additions
and
67 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters