Zebediah Figura : ntdll: Avoid leaking "drive" on error paths from get_mountmgr_fs_info() (Valgrind).
Alexandre Julliard
julliard at winehq.org
Mon Jun 8 15:19:55 CDT 2020
Module: wine
Branch: master
Commit: 19007cf31f42fc0c329e5a6f25e504e0a1fe21ef
URL: https://source.winehq.org/git/wine.git/?a=commit;h=19007cf31f42fc0c329e5a6f25e504e0a1fe21ef
Author: Zebediah Figura <z.figura12 at gmail.com>
Date: Sat Jun 6 15:35:32 2020 -0500
ntdll: Avoid leaking "drive" on error paths from get_mountmgr_fs_info() (Valgrind).
Signed-off-by: Zebediah Figura <z.figura12 at gmail.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/ntdll/file.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/dlls/ntdll/file.c b/dlls/ntdll/file.c
index b5a48db176..1b70e47367 100644
--- a/dlls/ntdll/file.c
+++ b/dlls/ntdll/file.c
@@ -2328,7 +2328,10 @@ static struct mountmgr_unix_drive *get_mountmgr_fs_info( HANDLE handle, int fd )
InitializeObjectAttributes( &attr, &string, 0, NULL, NULL );
if (NtOpenFile( &mountmgr, GENERIC_READ | SYNCHRONIZE, &attr, &io,
FILE_SHARE_READ | FILE_SHARE_WRITE, FILE_SYNCHRONOUS_IO_NONALERT ))
+ {
+ RtlFreeHeap( GetProcessHeap(), 0, drive );
return NULL;
+ }
status = NtDeviceIoControlFile( mountmgr, NULL, NULL, NULL, &io, IOCTL_MOUNTMGR_QUERY_UNIX_DRIVE,
drive, sizeof(*drive), drive, 1024 );
More information about the wine-cvs
mailing list