Mike McCormack wrote:


oops. The macro functions for duplicating strings already exist, so use them instead.


Mike


ChangeLog: * implement ChangeServiceConfigA using ChangeServiceConfigW

------------------------------------------------------------------------

Index: dlls/advapi32/service.c
===================================================================
RCS file: /home/wine/wine/dlls/advapi32/service.c,v
retrieving revision 1.60
diff -u -r1.60 service.c
--- dlls/advapi32/service.c     27 Sep 2004 20:35:27 -0000      1.60
+++ dlls/advapi32/service.c     20 Oct 2004 07:28:54 -0000
@@ -810,7 +810,8 @@

static inline VOID SERV_free( LPWSTR wstr )
{
-    HeapFree( GetProcessHeap(), 0, wstr );
+    if (wstr)
+        HeapFree( GetProcessHeap(), 0, wstr );
}



There is no need for this check. Freeing NULL pointers is not an error and is handled by the RtlFreeHeap code.


Rob




Reply via email to