Set pointers to NULL in delete_drive to prevent heap corruption in
load_drives.
This commit is contained in:
parent
ecdf41ef2c
commit
4fd4bf902d
|
@ -108,8 +108,11 @@ BOOL add_drive(char letter, char *targetpath, char *label, char *serial, uint ty
|
|||
void delete_drive(struct drive *d)
|
||||
{
|
||||
HeapFree(GetProcessHeap(), 0, d->unixpath);
|
||||
d->unixpath = NULL;
|
||||
HeapFree(GetProcessHeap(), 0, d->label);
|
||||
d->label = NULL;
|
||||
HeapFree(GetProcessHeap(), 0, d->serial);
|
||||
d->serial = NULL;
|
||||
|
||||
d->in_use = FALSE;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue