svn commit: samba r14196 - in branches/SAMBA_3_0/source/libmsrpc: .

jra at samba.org jra at samba.org
Sat Mar 11 02:48:20 GMT 2006


Author: jra
Date: 2006-03-11 02:48:20 +0000 (Sat, 11 Mar 2006)
New Revision: 14196

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

Log:
Move to using talloc, not malloc for all policy handles.
Jeremy

Modified:
   branches/SAMBA_3_0/source/libmsrpc/cac_lsarpc.c


Changeset:
Modified: branches/SAMBA_3_0/source/libmsrpc/cac_lsarpc.c
===================================================================
--- branches/SAMBA_3_0/source/libmsrpc/cac_lsarpc.c	2006-03-11 02:43:34 UTC (rev 14195)
+++ branches/SAMBA_3_0/source/libmsrpc/cac_lsarpc.c	2006-03-11 02:48:20 UTC (rev 14196)
@@ -65,7 +65,7 @@
       return CAC_FAILURE;
    }
 
-   policy = SMB_MALLOC_P(POLICY_HND);
+   policy = TALLOC_P(mem_ctx, POLICY_HND);
    if(!policy) {
       errno = ENOMEM;
       hnd->status = NT_STATUS_NO_MEMORY;
@@ -95,7 +95,6 @@
    }
 
    if(!NT_STATUS_IS_OK(hnd->status)) {
-      SAFE_FREE(policy);
       return CAC_FAILURE;
    }
 
@@ -125,14 +124,13 @@
       return CAC_FAILURE;
    }
 
-
    hnd->status = rpccli_lsa_close(pipe_hnd, mem_ctx, pol);
 
+   TALLOC_FREE(pol);
+
    if(!NT_STATUS_IS_OK(hnd->status))
       return CAC_FAILURE;
 
-   SAFE_FREE(pol);
-
    return CAC_SUCCESS;
 }
 



More information about the samba-cvs mailing list