[PATCH 1/4] services: Add a ref count to the service entry in svcctl_CreateServiceW.

Rob Shearman robertshearman at gmail.com
Tue Mar 24 06:25:35 CDT 2009


The ref count will be released by SC_RPC_HANDLE_destroy when the
returned handle is destroyed.

Change svcctl_OpenServiceW to use InterlockedIncrement to increment
the ref count since the service is in the database and therefore could
be shared and SC_RPC_HANDLE_destroy doesn't take the scmdatabase lock
when decrementing the ref count.
---
 programs/services/rpc.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

Found by Valgrind.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 23f78f1fb5f4905cb5b42d287040d843dd95dab1.diff
Type: text/x-patch
Size: 853 bytes
Desc: not available
URL: <http://www.winehq.org/pipermail/wine-patches/attachments/20090324/d8ecffd7/attachment.bin>


More information about the wine-patches mailing list