Commit 55bcda1
committed
Fix handle leak in GetFinalPathName
The fileHandle obtained from CreateFileW was never closed after
calling GetFinalPathNameByHandleW, leaking a kernel handle on
every invocation. Add CloseHandle(fileHandle) on both the success
path and the error path before die().
Assisted-by: Claude Opus 4.6
Signed-off-by: Tyrie Vella <tyrielv@gmail.com>1 parent 1e748bb commit 55bcda1
1 file changed
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| 31 | + | |
31 | 32 | | |
32 | 33 | | |
33 | 34 | | |
| |||
0 commit comments