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
1a7c0a6a
Commit
1a7c0a6a
authored
May 31, 2014
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Jun 11, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dmusic: Lock/unlock the module only on creation/destruction of the object.
parent
d67f35b9
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
14 deletions
+11
-14
collection.c
dlls/dmusic/collection.c
+4
-5
download.c
dlls/dmusic/download.c
+5
-5
port.c
dlls/dmusic/port.c
+2
-4
No files found.
dlls/dmusic/collection.c
View file @
1a7c0a6a
...
...
@@ -92,8 +92,6 @@ static ULONG WINAPI IDirectMusicCollectionImpl_IDirectMusicCollection_AddRef(LPD
TRACE
(
"(%p/%p)->(): new ref = %u
\n
"
,
iface
,
This
,
ref
);
DMUSIC_LockModule
();
return
ref
;
}
...
...
@@ -104,10 +102,10 @@ static ULONG WINAPI IDirectMusicCollectionImpl_IDirectMusicCollection_Release(LP
TRACE
(
"(%p/%p)->(): new ref = %u
\n
"
,
iface
,
This
,
ref
);
if
(
!
ref
)
if
(
!
ref
)
{
HeapFree
(
GetProcessHeap
(),
0
,
This
);
DMUSIC_UnlockModule
();
DMUSIC_UnlockModule
();
}
return
ref
;
}
...
...
@@ -851,6 +849,7 @@ HRESULT WINAPI DMUSIC_CreateDirectMusicCollectionImpl(LPCGUID lpcGUID, LPVOID* p
obj
->
ref
=
1
;
list_init
(
&
obj
->
Instruments
);
DMUSIC_LockModule
();
hr
=
IDirectMusicCollection_QueryInterface
(
&
obj
->
IDirectMusicCollection_iface
,
lpcGUID
,
ppobj
);
IDirectMusicCollection_Release
(
&
obj
->
IDirectMusicCollection_iface
);
...
...
dlls/dmusic/download.c
View file @
1a7c0a6a
...
...
@@ -52,8 +52,6 @@ static ULONG WINAPI IDirectMusicDownloadImpl_AddRef(IDirectMusicDownload *iface)
TRACE
(
"(%p)->(): new ref = %u
\n
"
,
iface
,
ref
);
DMUSIC_LockModule
();
return
ref
;
}
...
...
@@ -64,10 +62,10 @@ static ULONG WINAPI IDirectMusicDownloadImpl_Release(IDirectMusicDownload *iface
TRACE
(
"(%p)->(): new ref = %u
\n
"
,
iface
,
ref
);
if
(
!
ref
)
if
(
!
ref
)
{
HeapFree
(
GetProcessHeap
(),
0
,
This
);
DMUSIC_UnlockModule
();
DMUSIC_UnlockModule
();
}
return
ref
;
}
...
...
@@ -102,5 +100,7 @@ HRESULT DMUSIC_CreateDirectMusicDownloadImpl(const GUID *guid, void **ret_iface,
download
->
IDirectMusicDownload_iface
.
lpVtbl
=
&
DirectMusicDownload_Vtbl
;
download
->
ref
=
1
;
*
ret_iface
=
download
;
DMUSIC_LockModule
();
return
S_OK
;
}
dlls/dmusic/port.c
View file @
1a7c0a6a
...
...
@@ -70,8 +70,6 @@ static ULONG WINAPI IDirectMusicDownloadedInstrumentImpl_AddRef(LPDIRECTMUSICDOW
TRACE
(
"(%p)->(): new ref = %u
\n
"
,
iface
,
ref
);
DMUSIC_LockModule
();
return
ref
;
}
...
...
@@ -86,10 +84,9 @@ static ULONG WINAPI IDirectMusicDownloadedInstrumentImpl_Release(LPDIRECTMUSICDO
{
HeapFree
(
GetProcessHeap
(),
0
,
This
->
data
);
HeapFree
(
GetProcessHeap
(),
0
,
This
);
DMUSIC_UnlockModule
();
}
DMUSIC_UnlockModule
();
return
ref
;
}
...
...
@@ -123,6 +120,7 @@ static HRESULT DMUSIC_CreateDirectMusicDownloadedInstrumentImpl(IDirectMusicDown
object
->
ref
=
1
;
*
instrument
=
&
object
->
IDirectMusicDownloadedInstrument_iface
;
DMUSIC_LockModule
();
return
S_OK
;
}
...
...
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