Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
337e1e20
Commit
337e1e20
authored
Aug 28, 2006
by
Dan Kegel
Committed by
Alexandre Julliard
Aug 29, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi: Callers of alloc_msihandle should handle failure.
parent
29f0803c
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
26 additions
and
0 deletions
+26
-0
action.c
dlls/msi/action.c
+4
-0
database.c
dlls/msi/database.c
+2
-0
msi.c
dlls/msi/msi.c
+2
-0
msiquery.c
dlls/msi/msiquery.c
+8
-0
package.c
dlls/msi/package.c
+6
-0
preview.c
dlls/msi/preview.c
+2
-0
suminfo.c
dlls/msi/suminfo.c
+2
-0
No files found.
dlls/msi/action.c
View file @
337e1e20
...
...
@@ -3146,6 +3146,10 @@ static UINT ACTION_PublishProduct(MSIPACKAGE *package)
/* FIXME: Need to write more keys to the user registry */
hDb
=
alloc_msihandle
(
&
package
->
db
->
hdr
);
if
(
!
hDb
)
{
rc
=
ERROR_NOT_ENOUGH_MEMORY
;
goto
end
;
}
rc
=
MsiGetSummaryInformationW
(
hDb
,
NULL
,
0
,
&
hSumInfo
);
MsiCloseHandle
(
hDb
);
if
(
rc
==
ERROR_SUCCESS
)
...
...
dlls/msi/database.c
View file @
337e1e20
...
...
@@ -190,6 +190,8 @@ UINT WINAPI MsiOpenDatabaseW(LPCWSTR szDBPath, LPCWSTR szPersist, MSIHANDLE *phD
if
(
ret
==
ERROR_SUCCESS
)
{
*
phDB
=
alloc_msihandle
(
&
db
->
hdr
);
if
(
!
*
phDB
)
ret
=
ERROR_NOT_ENOUGH_MEMORY
;
msiobj_release
(
&
db
->
hdr
);
}
...
...
dlls/msi/msi.c
View file @
337e1e20
...
...
@@ -124,6 +124,8 @@ UINT WINAPI MsiOpenProductW( LPCWSTR szProduct, MSIHANDLE *phProduct )
if
(
r
==
ERROR_SUCCESS
)
{
*
phProduct
=
alloc_msihandle
(
&
package
->
hdr
);
if
(
!
*
phProduct
)
r
=
ERROR_NOT_ENOUGH_MEMORY
;
msiobj_release
(
&
package
->
hdr
);
}
return
r
;
...
...
dlls/msi/msiquery.c
View file @
337e1e20
...
...
@@ -254,6 +254,8 @@ UINT WINAPI MsiDatabaseOpenViewW(MSIHANDLE hdb,
if
(
ret
==
ERROR_SUCCESS
)
{
*
phView
=
alloc_msihandle
(
&
query
->
hdr
);
if
(
!
*
phView
)
ret
=
ERROR_NOT_ENOUGH_MEMORY
;
msiobj_release
(
&
query
->
hdr
);
}
msiobj_release
(
&
db
->
hdr
);
...
...
@@ -365,6 +367,8 @@ UINT WINAPI MsiViewFetch(MSIHANDLE hView, MSIHANDLE *record)
if
(
ret
==
ERROR_SUCCESS
)
{
*
record
=
alloc_msihandle
(
&
rec
->
hdr
);
if
(
!
*
record
)
ret
=
ERROR_NOT_ENOUGH_MEMORY
;
msiobj_release
(
&
rec
->
hdr
);
}
msiobj_release
(
&
query
->
hdr
);
...
...
@@ -532,6 +536,8 @@ UINT WINAPI MsiViewGetColumnInfo(MSIHANDLE hView, MSICOLINFO info, MSIHANDLE *hR
}
*
hRec
=
alloc_msihandle
(
&
rec
->
hdr
);
if
(
!
*
hRec
)
r
=
ERROR_NOT_ENOUGH_MEMORY
;
out:
msiobj_release
(
&
query
->
hdr
);
...
...
@@ -830,6 +836,8 @@ UINT WINAPI MsiDatabaseGetPrimaryKeysW( MSIHANDLE hdb,
if
(
r
==
ERROR_SUCCESS
)
{
*
phRec
=
alloc_msihandle
(
&
rec
->
hdr
);
if
(
!
*
phRec
)
r
=
ERROR_NOT_ENOUGH_MEMORY
;
msiobj_release
(
&
rec
->
hdr
);
}
msiobj_release
(
&
db
->
hdr
);
...
...
dlls/msi/package.c
View file @
337e1e20
...
...
@@ -365,6 +365,10 @@ static UINT msi_get_word_count( MSIPACKAGE *package )
MSIHANDLE
suminfo
;
MSIHANDLE
hdb
=
alloc_msihandle
(
&
package
->
db
->
hdr
);
if
(
!
hdb
)
{
ERR
(
"Unable to allocate handle
\n
"
);
return
0
;
}
rc
=
MsiGetSummaryInformationW
(
hdb
,
NULL
,
0
,
&
suminfo
);
MsiCloseHandle
(
hdb
);
if
(
rc
!=
ERROR_SUCCESS
)
...
...
@@ -584,6 +588,8 @@ UINT WINAPI MsiOpenPackageExW(LPCWSTR szPackage, DWORD dwOptions, MSIHANDLE *phP
if
(
ret
==
ERROR_SUCCESS
)
{
*
phPackage
=
alloc_msihandle
(
&
package
->
hdr
);
if
(
!
*
phPackage
)
ret
=
ERROR_NOT_ENOUGH_MEMORY
;
msiobj_release
(
&
package
->
hdr
);
}
...
...
dlls/msi/preview.c
View file @
337e1e20
...
...
@@ -76,6 +76,8 @@ UINT WINAPI MsiEnableUIPreview( MSIHANDLE hdb, MSIHANDLE* phPreview )
*
phPreview
=
alloc_msihandle
(
&
preview
->
hdr
);
msiobj_release
(
&
preview
->
hdr
);
r
=
ERROR_SUCCESS
;
if
(
!
*
phPreview
)
r
=
ERROR_NOT_ENOUGH_MEMORY
;
}
msiobj_release
(
&
db
->
hdr
);
...
...
dlls/msi/suminfo.c
View file @
337e1e20
...
...
@@ -468,6 +468,8 @@ UINT WINAPI MsiGetSummaryInformationW( MSIHANDLE hDatabase,
*
pHandle
=
alloc_msihandle
(
&
si
->
hdr
);
if
(
*
pHandle
)
ret
=
ERROR_SUCCESS
;
else
ret
=
ERROR_NOT_ENOUGH_MEMORY
;
msiobj_release
(
&
si
->
hdr
);
}
...
...
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