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
9fe94da2
Commit
9fe94da2
authored
Dec 10, 2004
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Dec 10, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add missing HeapFree's (found by smatch).
parent
25b6493a
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
3 deletions
+21
-3
msi.c
dlls/msi/msi.c
+17
-3
msiquery.c
dlls/msi/msiquery.c
+1
-0
table.c
dlls/msi/table.c
+3
-0
No files found.
dlls/msi/msi.c
View file @
9fe94da2
...
@@ -699,7 +699,8 @@ UINT WINAPI MsiGetProductInfoA(LPCSTR szProduct, LPCSTR szAttribute, LPSTR szBuf
...
@@ -699,7 +699,8 @@ UINT WINAPI MsiGetProductInfoA(LPCSTR szProduct, LPCSTR szAttribute, LPSTR szBuf
goto
end
;
goto
end
;
MultiByteToWideChar
(
CP_ACP
,
0
,
szAttribute
,
-
1
,
szwAttribute
,
len
);
MultiByteToWideChar
(
CP_ACP
,
0
,
szAttribute
,
-
1
,
szwAttribute
,
len
);
}
else
{
}
else
{
return
ERROR_INVALID_PARAMETER
;
hr
=
ERROR_INVALID_PARAMETER
;
goto
end
;
}
}
if
(
szBuffer
)
if
(
szBuffer
)
...
@@ -1263,7 +1264,10 @@ INSTALLSTATE WINAPI MsiGetComponentPathA(LPCSTR szProduct, LPCSTR szComponent,
...
@@ -1263,7 +1264,10 @@ INSTALLSTATE WINAPI MsiGetComponentPathA(LPCSTR szProduct, LPCSTR szComponent,
len
=
MultiByteToWideChar
(
CP_ACP
,
0
,
szComponent
,
-
1
,
NULL
,
0
);
len
=
MultiByteToWideChar
(
CP_ACP
,
0
,
szComponent
,
-
1
,
NULL
,
0
);
szwComponent
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
*
sizeof
(
WCHAR
)
);
szwComponent
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
*
sizeof
(
WCHAR
)
);
if
(
!
szwComponent
)
if
(
!
szwComponent
)
{
HeapFree
(
GetProcessHeap
(),
0
,
szwProduct
);
return
ERROR_OUTOFMEMORY
;
return
ERROR_OUTOFMEMORY
;
}
MultiByteToWideChar
(
CP_ACP
,
0
,
szComponent
,
-
1
,
szwComponent
,
len
);
MultiByteToWideChar
(
CP_ACP
,
0
,
szComponent
,
-
1
,
szwComponent
,
len
);
}
}
...
@@ -1316,7 +1320,10 @@ INSTALLSTATE WINAPI MsiQueryFeatureStateA(LPCSTR szProduct, LPCSTR szFeature)
...
@@ -1316,7 +1320,10 @@ INSTALLSTATE WINAPI MsiQueryFeatureStateA(LPCSTR szProduct, LPCSTR szFeature)
len
=
MultiByteToWideChar
(
CP_ACP
,
0
,
szFeature
,
-
1
,
NULL
,
0
);
len
=
MultiByteToWideChar
(
CP_ACP
,
0
,
szFeature
,
-
1
,
NULL
,
0
);
szwFeature
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
*
sizeof
(
WCHAR
)
);
szwFeature
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
*
sizeof
(
WCHAR
)
);
if
(
!
szwFeature
)
if
(
!
szwFeature
)
{
HeapFree
(
GetProcessHeap
(),
0
,
szwProduct
);
return
ERROR_OUTOFMEMORY
;
return
ERROR_OUTOFMEMORY
;
}
MultiByteToWideChar
(
CP_ACP
,
0
,
szFeature
,
-
1
,
szwFeature
,
len
);
MultiByteToWideChar
(
CP_ACP
,
0
,
szFeature
,
-
1
,
szwFeature
,
len
);
}
}
...
@@ -1353,13 +1360,19 @@ UINT WINAPI MsiGetFileVersionA(LPCSTR szFilePath, LPSTR lpVersionBuf, DWORD* pcc
...
@@ -1353,13 +1360,19 @@ UINT WINAPI MsiGetFileVersionA(LPCSTR szFilePath, LPSTR lpVersionBuf, DWORD* pcc
if
(
lpVersionBuf
&&
pcchVersionBuf
&&
*
pcchVersionBuf
)
{
if
(
lpVersionBuf
&&
pcchVersionBuf
&&
*
pcchVersionBuf
)
{
lpwVersionBuff
=
HeapAlloc
(
GetProcessHeap
(),
0
,
*
pcchVersionBuf
*
sizeof
(
WCHAR
));
lpwVersionBuff
=
HeapAlloc
(
GetProcessHeap
(),
0
,
*
pcchVersionBuf
*
sizeof
(
WCHAR
));
if
(
!
lpwVersionBuff
)
if
(
!
lpwVersionBuff
)
return
ERROR_OUTOFMEMORY
;
{
ret
=
ERROR_OUTOFMEMORY
;
goto
end
;
}
}
}
if
(
lpLangBuf
&&
pcchLangBuf
&&
*
pcchLangBuf
)
{
if
(
lpLangBuf
&&
pcchLangBuf
&&
*
pcchLangBuf
)
{
lpwLangBuff
=
HeapAlloc
(
GetProcessHeap
(),
0
,
*
pcchVersionBuf
*
sizeof
(
WCHAR
));
lpwLangBuff
=
HeapAlloc
(
GetProcessHeap
(),
0
,
*
pcchVersionBuf
*
sizeof
(
WCHAR
));
if
(
!
lpwLangBuff
)
if
(
!
lpwLangBuff
)
return
ERROR_OUTOFMEMORY
;
{
ret
=
ERROR_OUTOFMEMORY
;
goto
end
;
}
}
}
ret
=
MsiGetFileVersionW
(
szwFilePath
,
lpwVersionBuff
,
pcchVersionBuf
,
lpwLangBuff
,
pcchLangBuf
);
ret
=
MsiGetFileVersionW
(
szwFilePath
,
lpwVersionBuff
,
pcchVersionBuf
,
lpwLangBuff
,
pcchLangBuf
);
...
@@ -1369,6 +1382,7 @@ UINT WINAPI MsiGetFileVersionA(LPCSTR szFilePath, LPSTR lpVersionBuf, DWORD* pcc
...
@@ -1369,6 +1382,7 @@ UINT WINAPI MsiGetFileVersionA(LPCSTR szFilePath, LPSTR lpVersionBuf, DWORD* pcc
if
(
lpwLangBuff
)
if
(
lpwLangBuff
)
WideCharToMultiByte
(
CP_ACP
,
0
,
lpwLangBuff
,
-
1
,
lpLangBuf
,
*
pcchLangBuf
,
NULL
,
NULL
);
WideCharToMultiByte
(
CP_ACP
,
0
,
lpwLangBuff
,
-
1
,
lpLangBuf
,
*
pcchLangBuf
,
NULL
,
NULL
);
end:
if
(
szwFilePath
)
HeapFree
(
GetProcessHeap
(),
0
,
szwFilePath
);
if
(
szwFilePath
)
HeapFree
(
GetProcessHeap
(),
0
,
szwFilePath
);
if
(
lpwVersionBuff
)
HeapFree
(
GetProcessHeap
(),
0
,
lpwVersionBuff
);
if
(
lpwVersionBuff
)
HeapFree
(
GetProcessHeap
(),
0
,
lpwVersionBuff
);
if
(
lpwLangBuff
)
HeapFree
(
GetProcessHeap
(),
0
,
lpwLangBuff
);
if
(
lpwLangBuff
)
HeapFree
(
GetProcessHeap
(),
0
,
lpwLangBuff
);
...
...
dlls/msi/msiquery.c
View file @
9fe94da2
...
@@ -121,6 +121,7 @@ UINT WINAPI MsiDatabaseOpenViewA(MSIHANDLE hdb,
...
@@ -121,6 +121,7 @@ UINT WINAPI MsiDatabaseOpenViewA(MSIHANDLE hdb,
r
=
MsiDatabaseOpenViewW
(
hdb
,
szwQuery
,
phView
);
r
=
MsiDatabaseOpenViewW
(
hdb
,
szwQuery
,
phView
);
HeapFree
(
GetProcessHeap
(),
0
,
szwQuery
);
return
r
;
return
r
;
}
}
...
...
dlls/msi/table.c
View file @
9fe94da2
...
@@ -1203,7 +1203,10 @@ UINT TABLE_insert_row( struct tagMSIVIEW *view, UINT *num )
...
@@ -1203,7 +1203,10 @@ UINT TABLE_insert_row( struct tagMSIVIEW *view, UINT *num )
else
else
p
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sz
);
p
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sz
);
if
(
!
p
)
if
(
!
p
)
{
HeapFree
(
GetProcessHeap
(),
0
,
row
);
return
ERROR_NOT_ENOUGH_MEMORY
;
return
ERROR_NOT_ENOUGH_MEMORY
;
}
tv
->
table
->
data
=
p
;
tv
->
table
->
data
=
p
;
tv
->
table
->
data
[
tv
->
table
->
row_count
]
=
row
;
tv
->
table
->
data
[
tv
->
table
->
row_count
]
=
row
;
...
...
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