Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
b937407e
Commit
b937407e
authored
Jan 20, 2005
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Jan 20, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Do not check for non NULL pointer before HeapFree'ing it. It's
redundant.
parent
717eb8ff
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
49 additions
and
95 deletions
+49
-95
action.c
dlls/msi/action.c
+14
-28
cond.y
dlls/msi/cond.y
+1
-2
distinct.c
dlls/msi/distinct.c
+2
-4
msi.c
dlls/msi/msi.c
+19
-35
order.c
dlls/msi/order.c
+2
-4
package.c
dlls/msi/package.c
+3
-6
string.c
dlls/msi/string.c
+1
-2
suminfo.c
dlls/msi/suminfo.c
+1
-2
table.c
dlls/msi/table.c
+4
-8
where.c
dlls/msi/where.c
+2
-4
No files found.
dlls/msi/action.c
View file @
b937407e
...
...
@@ -602,12 +602,10 @@ static void ui_actiondata(MSIPACKAGE *package, LPCWSTR action, MSIRECORD * recor
}
/* update the cached actionformat */
if
(
package
->
ActionFormat
)
HeapFree
(
GetProcessHeap
(),
0
,
package
->
ActionFormat
);
HeapFree
(
GetProcessHeap
(),
0
,
package
->
ActionFormat
);
package
->
ActionFormat
=
load_dynamic_stringW
(
row
,
3
);
if
(
package
->
LastAction
)
HeapFree
(
GetProcessHeap
(),
0
,
package
->
LastAction
);
HeapFree
(
GetProcessHeap
(),
0
,
package
->
LastAction
);
package
->
LastAction
=
dupstrW
(
action
);
msiobj_release
(
&
row
->
hdr
);
...
...
@@ -2400,8 +2398,7 @@ static INT load_folder(MSIPACKAGE *package, const WCHAR* dir)
if
(
targetdir
)
{
TRACE
(
" TargetDefault = %s
\n
"
,
debugstr_w
(
targetdir
));
if
(
package
->
folders
[
index
].
TargetDefault
)
HeapFree
(
GetProcessHeap
(),
0
,
package
->
folders
[
index
].
TargetDefault
);
HeapFree
(
GetProcessHeap
(),
0
,
package
->
folders
[
index
].
TargetDefault
);
package
->
folders
[
index
].
TargetDefault
=
dupstrW
(
targetdir
);
}
...
...
@@ -2769,8 +2766,7 @@ static UINT ACTION_CostFinalize(MSIPACKAGE *package)
/* calculate target */
p
=
resolve_folder
(
package
,
comp
->
Directory
,
FALSE
,
FALSE
,
NULL
);
if
(
file
->
TargetPath
)
HeapFree
(
GetProcessHeap
(),
0
,
file
->
TargetPath
);
HeapFree
(
GetProcessHeap
(),
0
,
file
->
TargetPath
);
TRACE
(
"file %s is named %s
\n
"
,
debugstr_w
(
file
->
File
),
debugstr_w
(
file
->
FileName
));
...
...
@@ -3329,8 +3325,7 @@ static UINT ACTION_InstallFiles(MSIPACKAGE *package)
comp
=
&
package
->
components
[
file
->
ComponentIndex
];
p
=
resolve_folder
(
package
,
comp
->
Directory
,
FALSE
,
FALSE
,
NULL
);
if
(
file
->
TargetPath
)
HeapFree
(
GetProcessHeap
(),
0
,
file
->
TargetPath
);
HeapFree
(
GetProcessHeap
(),
0
,
file
->
TargetPath
);
file
->
TargetPath
=
build_directory_name
(
2
,
p
,
file
->
FileName
);
...
...
@@ -3484,8 +3479,7 @@ static UINT ACTION_DuplicateFiles(MSIPACKAGE *package)
{
ERR
(
"Original file unknown %s
\n
"
,
debugstr_w
(
file_key
));
msiobj_release
(
&
row
->
hdr
);
if
(
file_source
)
HeapFree
(
GetProcessHeap
(),
0
,
file_source
);
HeapFree
(
GetProcessHeap
(),
0
,
file_source
);
continue
;
}
...
...
@@ -3519,8 +3513,7 @@ static UINT ACTION_DuplicateFiles(MSIPACKAGE *package)
{
ERR
(
"Unable to get destination folder
\n
"
);
msiobj_release
(
&
row
->
hdr
);
if
(
file_source
)
HeapFree
(
GetProcessHeap
(),
0
,
file_source
);
HeapFree
(
GetProcessHeap
(),
0
,
file_source
);
break
;
}
}
...
...
@@ -3786,14 +3779,10 @@ static UINT ACTION_WriteRegistryValues(MSIPACKAGE *package)
msiobj_release
(
&
row
->
hdr
);
RegCloseKey
(
hkey
);
next:
if
(
uikey
)
HeapFree
(
GetProcessHeap
(),
0
,
uikey
);
if
(
key
)
HeapFree
(
GetProcessHeap
(),
0
,
key
);
if
(
name
)
HeapFree
(
GetProcessHeap
(),
0
,
name
);
if
(
component
)
HeapFree
(
GetProcessHeap
(),
0
,
component
);
HeapFree
(
GetProcessHeap
(),
0
,
uikey
);
HeapFree
(
GetProcessHeap
(),
0
,
key
);
HeapFree
(
GetProcessHeap
(),
0
,
name
);
HeapFree
(
GetProcessHeap
(),
0
,
component
);
}
MSI_ViewClose
(
view
);
msiobj_release
(
&
view
->
hdr
);
...
...
@@ -5274,8 +5263,7 @@ static UINT ACTION_WriteIniValues(MSIPACKAGE *package)
component
=
load_dynamic_stringW
(
row
,
8
);
component_index
=
get_loaded_component
(
package
,
component
);
if
(
component
)
HeapFree
(
GetProcessHeap
(),
0
,
component
);
HeapFree
(
GetProcessHeap
(),
0
,
component
);
if
(
package
->
components
[
component_index
].
ActionRequest
!=
INSTALLSTATE_LOCAL
)
...
...
@@ -6035,8 +6023,7 @@ UINT MSI_SetTargetPathW(MSIPACKAGE *package, LPCWSTR szFolder,
if
(
!
path
)
return
ERROR_INVALID_PARAMETER
;
if
(
folder
->
Property
)
HeapFree
(
GetProcessHeap
(),
0
,
folder
->
Property
);
HeapFree
(
GetProcessHeap
(),
0
,
folder
->
Property
);
len
=
strlenW
(
szFolderPath
);
...
...
@@ -6065,8 +6052,7 @@ UINT MSI_SetTargetPathW(MSIPACKAGE *package, LPCWSTR szFolder,
{
for
(
i
=
0
;
i
<
package
->
loaded_folders
;
i
++
)
{
if
(
package
->
folders
[
i
].
ResolvedTarget
)
HeapFree
(
GetProcessHeap
(),
0
,
package
->
folders
[
i
].
ResolvedTarget
);
HeapFree
(
GetProcessHeap
(),
0
,
package
->
folders
[
i
].
ResolvedTarget
);
package
->
folders
[
i
].
ResolvedTarget
=
NULL
;
}
...
...
dlls/msi/cond.y
View file @
b937407e
...
...
@@ -767,8 +767,7 @@ MSICONDITION WINAPI MsiEvaluateConditionA( MSIHANDLE hInstall, LPCSTR szConditio
r
=
MsiEvaluateConditionW
(
hInstall
,
szwCond
);
if
(
szwCond
)
HeapFree
(
GetProcessHeap
(),
0
,
szwCond
);
HeapFree
(
GetProcessHeap
(),
0
,
szwCond
);
return
r
;
}
dlls/msi/distinct.c
View file @
b937407e
...
...
@@ -178,8 +178,7 @@ static UINT DISTINCT_close( struct tagMSIVIEW *view )
if
(
!
dv
->
table
)
return
ERROR_FUNCTION_FAILED
;
if
(
dv
->
translation
)
HeapFree
(
GetProcessHeap
(),
0
,
dv
->
translation
);
HeapFree
(
GetProcessHeap
(),
0
,
dv
->
translation
);
dv
->
translation
=
NULL
;
dv
->
row_count
=
0
;
...
...
@@ -239,8 +238,7 @@ static UINT DISTINCT_delete( struct tagMSIVIEW *view )
if
(
dv
->
table
)
dv
->
table
->
ops
->
delete
(
dv
->
table
);
if
(
dv
->
translation
)
HeapFree
(
GetProcessHeap
(),
0
,
dv
->
translation
);
HeapFree
(
GetProcessHeap
(),
0
,
dv
->
translation
);
msiobj_release
(
&
dv
->
db
->
hdr
);
HeapFree
(
GetProcessHeap
(),
0
,
dv
);
...
...
dlls/msi/msi.c
View file @
b937407e
...
...
@@ -381,10 +381,8 @@ UINT WINAPI MsiOpenDatabaseA(LPCSTR szDBPath, LPCSTR szPersist, MSIHANDLE *phDB)
r
=
MsiOpenDatabaseW
(
szwDBPath
,
szwPersist
,
phDB
);
end:
if
(
szwPersist
)
HeapFree
(
GetProcessHeap
(),
0
,
szwPersist
);
if
(
szwDBPath
)
HeapFree
(
GetProcessHeap
(),
0
,
szwDBPath
);
HeapFree
(
GetProcessHeap
(),
0
,
szwPersist
);
HeapFree
(
GetProcessHeap
(),
0
,
szwDBPath
);
return
r
;
}
...
...
@@ -406,8 +404,7 @@ UINT WINAPI MsiOpenProductA(LPCSTR szProduct, MSIHANDLE *phProduct)
ret
=
MsiOpenProductW
(
szwProd
,
phProduct
);
if
(
szwProd
)
HeapFree
(
GetProcessHeap
(),
0
,
szwProd
);
HeapFree
(
GetProcessHeap
(),
0
,
szwProd
);
return
ret
;
}
...
...
@@ -467,8 +464,7 @@ UINT WINAPI MsiOpenProductW(LPCWSTR szProduct, MSIHANDLE *phProduct)
r
=
MsiOpenPackageW
(
path
,
phProduct
);
end:
if
(
path
)
HeapFree
(
GetProcessHeap
(),
0
,
path
);
HeapFree
(
GetProcessHeap
(),
0
,
path
);
if
(
hKeyProduct
)
RegCloseKey
(
hKeyProduct
);
RegCloseKey
(
hKeyUninstall
);
...
...
@@ -530,11 +526,8 @@ UINT WINAPI MsiInstallProductA(LPCSTR szPackagePath, LPCSTR szCommandLine)
r
=
MsiInstallProductW
(
szwPath
,
szwCommand
);
end:
if
(
szwPath
)
HeapFree
(
GetProcessHeap
(),
0
,
szwPath
);
if
(
szwCommand
)
HeapFree
(
GetProcessHeap
(),
0
,
szwCommand
);
HeapFree
(
GetProcessHeap
(),
0
,
szwPath
);
HeapFree
(
GetProcessHeap
(),
0
,
szwCommand
);
return
r
;
}
...
...
@@ -705,8 +698,7 @@ UINT WINAPI MsiConfigureProductA(LPCSTR szProduct, int iInstallLevel,
hr
=
MsiConfigureProductW
(
szwProduct
,
iInstallLevel
,
eInstallState
);
end:
if
(
szwProduct
)
HeapFree
(
GetProcessHeap
(),
0
,
szwProduct
);
HeapFree
(
GetProcessHeap
(),
0
,
szwProduct
);
return
hr
;
}
...
...
@@ -752,10 +744,8 @@ UINT WINAPI MsiGetProductCodeA(LPCSTR szComponent, LPSTR szBuffer)
}
end:
if
(
szwComponent
)
HeapFree
(
GetProcessHeap
(),
0
,
szwComponent
);
if
(
szwBuffer
)
HeapFree
(
GetProcessHeap
(),
0
,
szwBuffer
);
HeapFree
(
GetProcessHeap
(),
0
,
szwComponent
);
HeapFree
(
GetProcessHeap
(),
0
,
szwBuffer
);
return
hr
;
}
...
...
@@ -820,12 +810,9 @@ UINT WINAPI MsiGetProductInfoA(LPCSTR szProduct, LPCSTR szAttribute, LPSTR szBuf
}
end:
if
(
szwProduct
)
HeapFree
(
GetProcessHeap
(),
0
,
szwProduct
);
if
(
szwAttribute
)
HeapFree
(
GetProcessHeap
(),
0
,
szwAttribute
);
if
(
szwBuffer
)
HeapFree
(
GetProcessHeap
(),
0
,
szwBuffer
);
HeapFree
(
GetProcessHeap
(),
0
,
szwProduct
);
HeapFree
(
GetProcessHeap
(),
0
,
szwAttribute
);
HeapFree
(
GetProcessHeap
(),
0
,
szwBuffer
);
return
hr
;
}
...
...
@@ -885,8 +872,7 @@ UINT WINAPI MsiEnableLogA(DWORD dwLogMode, LPCSTR szLogFile, DWORD attributes)
hr
=
MsiEnableLogW
(
dwLogMode
,
szwLogFile
,
attributes
);
end:
if
(
szwLogFile
)
HeapFree
(
GetProcessHeap
(),
0
,
szwLogFile
);
HeapFree
(
GetProcessHeap
(),
0
,
szwLogFile
);
return
hr
;
}
...
...
@@ -1169,8 +1155,7 @@ UINT WINAPI MsiEnumFeaturesA(LPCSTR szProduct, DWORD index,
szParent
,
GUID_SIZE
,
NULL
,
NULL
);
}
if
(
szwProduct
)
HeapFree
(
GetProcessHeap
(),
0
,
szwProduct
);
HeapFree
(
GetProcessHeap
(),
0
,
szwProduct
);
return
r
;
}
...
...
@@ -1282,8 +1267,7 @@ UINT WINAPI MsiEnumClientsA(LPCSTR szComponent, DWORD index, LPSTR szProduct)
szProduct
,
GUID_SIZE
,
NULL
,
NULL
);
}
if
(
szwComponent
)
HeapFree
(
GetProcessHeap
(),
0
,
szwComponent
);
HeapFree
(
GetProcessHeap
(),
0
,
szwComponent
);
return
r
;
}
...
...
@@ -1647,9 +1631,9 @@ UINT WINAPI MsiGetFileVersionA(LPCSTR szFilePath, LPSTR lpVersionBuf, DWORD* pcc
WideCharToMultiByte
(
CP_ACP
,
0
,
lpwLangBuff
,
-
1
,
lpLangBuf
,
*
pcchLangBuf
,
NULL
,
NULL
);
end:
if
(
szwFilePath
)
HeapFree
(
GetProcessHeap
(),
0
,
szwFilePath
);
if
(
lpwVersionBuff
)
HeapFree
(
GetProcessHeap
(),
0
,
lpwVersionBuff
);
if
(
lpwLangBuff
)
HeapFree
(
GetProcessHeap
(),
0
,
lpwLangBuff
);
HeapFree
(
GetProcessHeap
(),
0
,
szwFilePath
);
HeapFree
(
GetProcessHeap
(),
0
,
lpwVersionBuff
);
HeapFree
(
GetProcessHeap
(),
0
,
lpwLangBuff
);
return
ret
;
}
...
...
@@ -1705,7 +1689,7 @@ UINT WINAPI MsiGetFileVersionW(LPCWSTR szFilePath, LPWSTR lpVersionBuf, DWORD* p
}
end:
if
(
lpVer
)
HeapFree
(
GetProcessHeap
(),
0
,
lpVer
);
HeapFree
(
GetProcessHeap
(),
0
,
lpVer
);
return
ret
;
}
...
...
dlls/msi/order.c
View file @
b937407e
...
...
@@ -187,8 +187,7 @@ static UINT ORDER_close( struct tagMSIVIEW *view )
if
(
!
ov
->
table
)
return
ERROR_FUNCTION_FAILED
;
if
(
ov
->
reorder
)
HeapFree
(
GetProcessHeap
(),
0
,
ov
->
reorder
);
HeapFree
(
GetProcessHeap
(),
0
,
ov
->
reorder
);
ov
->
reorder
=
NULL
;
return
ov
->
table
->
ops
->
close
(
ov
->
table
);
...
...
@@ -240,8 +239,7 @@ static UINT ORDER_delete( struct tagMSIVIEW *view )
if
(
ov
->
table
)
ov
->
table
->
ops
->
delete
(
ov
->
table
);
if
(
ov
->
reorder
)
HeapFree
(
GetProcessHeap
(),
0
,
ov
->
reorder
);
HeapFree
(
GetProcessHeap
(),
0
,
ov
->
reorder
);
ov
->
reorder
=
NULL
;
msiobj_release
(
&
ov
->
db
->
hdr
);
...
...
dlls/msi/package.c
View file @
b937407e
...
...
@@ -76,8 +76,7 @@ UINT WINAPI MsiOpenPackageA(LPCSTR szPackage, MSIHANDLE *phPackage)
ret
=
MsiOpenPackageW
(
szwPack
,
phPackage
);
if
(
szwPack
)
HeapFree
(
GetProcessHeap
(),
0
,
szwPack
);
HeapFree
(
GetProcessHeap
(),
0
,
szwPack
);
return
ret
;
}
...
...
@@ -649,10 +648,8 @@ UINT WINAPI MsiSetPropertyA( MSIHANDLE hInstall, LPCSTR szName, LPCSTR szValue)
hr
=
MsiSetPropertyW
(
hInstall
,
szwName
,
szwValue
);
end:
if
(
szwName
)
HeapFree
(
GetProcessHeap
(),
0
,
szwName
);
if
(
szwValue
)
HeapFree
(
GetProcessHeap
(),
0
,
szwValue
);
HeapFree
(
GetProcessHeap
(),
0
,
szwName
);
HeapFree
(
GetProcessHeap
(),
0
,
szwValue
);
return
hr
;
}
...
...
dlls/msi/string.c
View file @
b937407e
...
...
@@ -393,8 +393,7 @@ UINT msi_string2idA( string_table *st, LPCSTR buffer, UINT *id )
MultiByteToWideChar
(
st
->
codepage
,
0
,
buffer
,
-
1
,
str
,
sz
);
r
=
msi_string2idW
(
st
,
str
,
id
);
if
(
str
)
HeapFree
(
GetProcessHeap
(),
0
,
str
);
HeapFree
(
GetProcessHeap
(),
0
,
str
);
return
r
;
}
...
...
dlls/msi/suminfo.c
View file @
b937407e
...
...
@@ -65,8 +65,7 @@ UINT WINAPI MsiGetSummaryInformationA(MSIHANDLE hDatabase,
ret
=
MsiGetSummaryInformationW
(
hDatabase
,
szwDatabase
,
uiUpdateCount
,
phSummaryInfo
);
if
(
szwDatabase
)
HeapFree
(
GetProcessHeap
(),
0
,
szwDatabase
);
HeapFree
(
GetProcessHeap
(),
0
,
szwDatabase
);
return
ret
;
}
...
...
dlls/msi/table.c
View file @
b937407e
...
...
@@ -747,10 +747,8 @@ UINT load_string_table( MSIDATABASE *db )
ret
=
ERROR_SUCCESS
;
end:
if
(
pool
)
HeapFree
(
GetProcessHeap
(),
0
,
pool
);
if
(
data
)
HeapFree
(
GetProcessHeap
(),
0
,
data
);
HeapFree
(
GetProcessHeap
(),
0
,
pool
);
HeapFree
(
GetProcessHeap
(),
0
,
data
);
return
ret
;
}
...
...
@@ -830,10 +828,8 @@ UINT save_string_table( MSIDATABASE *db )
ret
=
ERROR_SUCCESS
;
err:
if
(
data
)
HeapFree
(
GetProcessHeap
(),
0
,
data
);
if
(
pool
)
HeapFree
(
GetProcessHeap
(),
0
,
pool
);
HeapFree
(
GetProcessHeap
(),
0
,
data
);
HeapFree
(
GetProcessHeap
(),
0
,
pool
);
return
ret
;
}
...
...
dlls/msi/where.c
View file @
b937407e
...
...
@@ -269,8 +269,7 @@ static UINT WHERE_close( struct tagMSIVIEW *view )
if
(
!
wv
->
table
)
return
ERROR_FUNCTION_FAILED
;
if
(
wv
->
reorder
)
HeapFree
(
GetProcessHeap
(),
0
,
wv
->
reorder
);
HeapFree
(
GetProcessHeap
(),
0
,
wv
->
reorder
);
wv
->
reorder
=
NULL
;
return
wv
->
table
->
ops
->
close
(
wv
->
table
);
...
...
@@ -329,8 +328,7 @@ static UINT WHERE_delete( struct tagMSIVIEW *view )
if
(
wv
->
table
)
wv
->
table
->
ops
->
delete
(
wv
->
table
);
if
(
wv
->
reorder
)
HeapFree
(
GetProcessHeap
(),
0
,
wv
->
reorder
);
HeapFree
(
GetProcessHeap
(),
0
,
wv
->
reorder
);
wv
->
reorder
=
NULL
;
wv
->
row_count
=
0
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment