Robert Shearman : msi: Always set a value for intype in ready_volume.
Alexandre Julliard
julliard at wine.codeweavers.com
Wed Feb 22 15:30:22 CST 2006
Module: wine
Branch: refs/heads/master
Commit: e664435f50607f708adecee374fdb9f640057834
URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=e664435f50607f708adecee374fdb9f640057834
Author: Robert Shearman <rob at codeweavers.com>
Date: Wed Feb 22 16:30:54 2006 +0000
msi: Always set a value for intype in ready_volume.
Remove a memory leak.
---
dlls/msi/files.c | 10 +++++++---
1 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/dlls/msi/files.c b/dlls/msi/files.c
index 8c381ad..b5c80ca 100644
--- a/dlls/msi/files.c
+++ b/dlls/msi/files.c
@@ -345,7 +345,11 @@ static BOOL check_volume(LPCWSTR path, L
UINT type;
if (!(path[0] && path[1] == ':'))
+ {
+ if (intype)
+ *intype = DRIVE_NO_ROOT_DIR;
return TRUE;
+ }
drive[0] = path[0];
drive[1] = path[1];
@@ -355,15 +359,15 @@ static BOOL check_volume(LPCWSTR path, L
type = GetDriveTypeW(drive);
TRACE("drive is of type %x\n",type);
+ if (intype)
+ *intype=type;
+
if (type == DRIVE_UNKNOWN || type == DRIVE_NO_ROOT_DIR ||
type == DRIVE_FIXED || type == DRIVE_RAMDISK)
return TRUE;
GetVolumeInformationW(drive, name, MAX_PATH, NULL, NULL, NULL, NULL, 0);
TRACE("Drive contains %s\n", debugstr_w(name));
- volume = strdupW(name);
- if (*intype)
- *intype=type;
return (strcmpiW(want_volume,name)==0);
}
More information about the wine-cvs
mailing list