Commit 9c4cce8
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 9c4cce8
1 file changed
Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| 33 | + | |
33 | 34 | | |
34 | 35 | | |
35 | 36 | | |
| 37 | + | |
| 38 | + | |
36 | 39 | | |
37 | 40 | | |
38 | 41 | | |
| |||
0 commit comments