Commit 4fd4bf90 authored by Michael Jung's avatar Michael Jung Committed by Alexandre Julliard

Set pointers to NULL in delete_drive to prevent heap corruption in

load_drives.
parent ecdf41ef
......@@ -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;
}
......
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