From 4fd4bf902d07b9f3171d0ac5f3bccd477a547718 Mon Sep 17 00:00:00 2001 From: Michael Jung Date: Mon, 14 Feb 2005 20:54:21 +0000 Subject: [PATCH] Set pointers to NULL in delete_drive to prevent heap corruption in load_drives. --- programs/winecfg/drive.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/programs/winecfg/drive.c b/programs/winecfg/drive.c index 4ee00f3ea9c..6624fdcafbc 100644 --- a/programs/winecfg/drive.c +++ b/programs/winecfg/drive.c @@ -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; } -- 2.11.4.GIT