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
b3a7f37a
Commit
b3a7f37a
authored
Jan 20, 2005
by
Mike McCormack
Committed by
Alexandre Julliard
Jan 20, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix refcounting, use Interlocked functions.
parent
21842318
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
7 deletions
+12
-7
handle.c
dlls/msi/handle.c
+5
-5
msi.c
dlls/msi/msi.c
+4
-1
msipriv.h
dlls/msi/msipriv.h
+1
-1
msiquery.c
dlls/msi/msiquery.c
+2
-0
No files found.
dlls/msi/handle.c
View file @
b3a7f37a
...
...
@@ -157,7 +157,7 @@ void msiobj_addref( MSIOBJECTHDR *info )
return
;
}
info
->
refcount
++
;
InterlockedIncrement
(
&
info
->
refcount
)
;
}
void
msiobj_lock
(
MSIOBJECTHDR
*
info
)
...
...
@@ -185,12 +185,12 @@ int msiobj_release( MSIOBJECTHDR *info )
return
-
1
;
}
ret
=
info
->
refcount
--
;
if
(
info
->
refcount
==
0
)
ret
=
InterlockedDecrement
(
&
info
->
refcount
)
;
if
(
ret
==
0
)
{
if
(
info
->
destructor
)
if
(
info
->
destructor
)
info
->
destructor
(
info
);
HeapFree
(
GetProcessHeap
(),
0
,
info
);
HeapFree
(
GetProcessHeap
(),
0
,
info
);
TRACE
(
"object %p destroyed
\n
"
,
info
);
}
...
...
dlls/msi/msi.c
View file @
b3a7f37a
...
...
@@ -228,9 +228,12 @@ BOOL encode_base85_guid( GUID *guid, LPWSTR str )
VOID
MSI_CloseDatabase
(
MSIOBJECTHDR
*
arg
)
{
MSIDATABASE
*
db
=
(
MSIDATABASE
*
)
arg
;
DWORD
r
;
free_cached_tables
(
db
);
IStorage_Release
(
db
->
storage
);
r
=
IStorage_Release
(
db
->
storage
);
if
(
r
)
ERR
(
"database reference count was not zero (%ld)
\n
"
,
r
);
}
UINT
MSI_OpenDatabaseW
(
LPCWSTR
szDBPath
,
LPCWSTR
szPersist
,
MSIDATABASE
**
pdb
)
...
...
dlls/msi/msipriv.h
View file @
b3a7f37a
...
...
@@ -53,7 +53,7 @@ struct tagMSIOBJECTHDR
{
UINT
magic
;
UINT
type
;
UINT
refcount
;
DWORD
refcount
;
msihandledestructor
destructor
;
struct
tagMSIOBJECTHDR
*
next
;
struct
tagMSIOBJECTHDR
*
prev
;
...
...
dlls/msi/msiquery.c
View file @
b3a7f37a
...
...
@@ -461,6 +461,8 @@ UINT WINAPI MsiDatabaseCommit( MSIHANDLE hdb )
/* FIXME: unlock the database */
msiobj_release
(
&
db
->
hdr
);
return
r
;
}
...
...
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