svn commit: samba r9966 - in trunk/source/rpc_server: .

jerry at samba.org jerry at samba.org
Fri Sep 2 19:45:22 GMT 2005


Author: jerry
Date: 2005-09-02 19:45:22 +0000 (Fri, 02 Sep 2005)
New Revision: 9966

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=9966

Log:
moving ServiceInfo structure to talloc()'d based
Modified:
   trunk/source/rpc_server/srv_svcctl_nt.c


Changeset:
Modified: trunk/source/rpc_server/srv_svcctl_nt.c
===================================================================
--- trunk/source/rpc_server/srv_svcctl_nt.c	2005-09-02 18:30:12 UTC (rev 9965)
+++ trunk/source/rpc_server/srv_svcctl_nt.c	2005-09-02 19:45:22 UTC (rev 9966)
@@ -142,10 +142,7 @@
  
 static void free_service_handle_info(void *ptr)
 {
-	SERVICE_INFO *info = (SERVICE_INFO*)ptr;
-	
-	SAFE_FREE(info->name);
-	SAFE_FREE(info);
+	TALLOC_FREE( ptr );
 }
 
 /******************************************************************
@@ -173,11 +170,9 @@
 	SERVICE_INFO *info = NULL;
 	WERROR result = WERR_OK;
 	
-	if ( !(info = SMB_MALLOC_P( SERVICE_INFO )) )
+	if ( !(info = TALLOC_ZERO_P( NULL, SERVICE_INFO )) )
 		return WERR_NOMEM;
 
-	ZERO_STRUCTP( info );
-		
 	/* the Service Manager has a NULL name */
 	
 	if ( !service ) {
@@ -201,7 +196,7 @@
 			goto done;
 		}
 
-		if ( !(info->name  = SMB_STRDUP( service )) ) {
+		if ( !(info->name  = talloc_strdup( info, service )) ) {
 			result = WERR_NOMEM;
 			goto done;
 		}



More information about the samba-cvs mailing list