Commit 19007cf3 authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

ntdll: Avoid leaking "drive" on error paths from get_mountmgr_fs_info() (Valgrind).

parent c96fa96c
...@@ -2328,7 +2328,10 @@ static struct mountmgr_unix_drive *get_mountmgr_fs_info( HANDLE handle, int fd ) ...@@ -2328,7 +2328,10 @@ static struct mountmgr_unix_drive *get_mountmgr_fs_info( HANDLE handle, int fd )
InitializeObjectAttributes( &attr, &string, 0, NULL, NULL ); InitializeObjectAttributes( &attr, &string, 0, NULL, NULL );
if (NtOpenFile( &mountmgr, GENERIC_READ | SYNCHRONIZE, &attr, &io, if (NtOpenFile( &mountmgr, GENERIC_READ | SYNCHRONIZE, &attr, &io,
FILE_SHARE_READ | FILE_SHARE_WRITE, FILE_SYNCHRONOUS_IO_NONALERT )) FILE_SHARE_READ | FILE_SHARE_WRITE, FILE_SYNCHRONOUS_IO_NONALERT ))
{
RtlFreeHeap( GetProcessHeap(), 0, drive );
return NULL; return NULL;
}
status = NtDeviceIoControlFile( mountmgr, NULL, NULL, NULL, &io, IOCTL_MOUNTMGR_QUERY_UNIX_DRIVE, status = NtDeviceIoControlFile( mountmgr, NULL, NULL, NULL, &io, IOCTL_MOUNTMGR_QUERY_UNIX_DRIVE,
drive, sizeof(*drive), drive, 1024 ); drive, sizeof(*drive), drive, 1024 );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment