1
1
Fork 0
mirror of https://github.com/pbatard/rufus.git synced 2024-08-14 23:57:05 +00:00

Don't leak logical handle from GetDriveLabel

This commit is contained in:
Derek Foreman 2020-04-28 11:31:34 -05:00
parent 077f143252
commit e1a3e63cb8

View file

@ -969,6 +969,7 @@ BOOL GetDriveLabel(DWORD DriveIndex, char* letters, char** label)
wchar_to_utf8_no_alloc(VolumeName, VolumeLabel, sizeof(VolumeLabel));
*label = (VolumeLabel[0] != 0) ? VolumeLabel : STR_NO_LABEL;
}
safe_closehandle(h);
// Drive without volume assigned - always enabled
return TRUE;
}