summaryrefslogtreecommitdiff
path: root/source3/libmsrpc
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2006-03-11 02:48:20 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:15:16 -0500
commit1e34c2959628b3134943d8b361230b5bc2a37d5e (patch)
tree0638bc66a7072b3b90f85b135b900566c90c7c13 /source3/libmsrpc
parentcfa4589662a4e872964148057cce4f2188aeec71 (diff)
downloadsamba-1e34c2959628b3134943d8b361230b5bc2a37d5e.tar.gz
samba-1e34c2959628b3134943d8b361230b5bc2a37d5e.tar.bz2
samba-1e34c2959628b3134943d8b361230b5bc2a37d5e.zip
r14196: Move to using talloc, not malloc for all policy handles.
Jeremy (This used to be commit 6f4804a265f60c614e6e215ed663da0d8205c613)
Diffstat (limited to 'source3/libmsrpc')
-rw-r--r--source3/libmsrpc/cac_lsarpc.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/source3/libmsrpc/cac_lsarpc.c b/source3/libmsrpc/cac_lsarpc.c
index 1877e9cd7e..13aaa01754 100644
--- a/source3/libmsrpc/cac_lsarpc.c
+++ b/source3/libmsrpc/cac_lsarpc.c
@@ -65,7 +65,7 @@ int cac_LsaOpenPolicy(CacServerHandle *hnd, TALLOC_CTX *mem_ctx, struct LsaOpenP
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 @@ int cac_LsaOpenPolicy(CacServerHandle *hnd, TALLOC_CTX *mem_ctx, struct LsaOpenP
}
if(!NT_STATUS_IS_OK(hnd->status)) {
- SAFE_FREE(policy);
return CAC_FAILURE;
}
@@ -125,14 +124,13 @@ int cac_LsaClosePolicy(CacServerHandle *hnd, TALLOC_CTX *mem_ctx, POLICY_HND *po
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;
}