git.samba.org
/
samba.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8aca76f
)
r14196: Move to using talloc, not malloc for all policy handles.
author
Jeremy Allison
<jra@samba.org>
Sat, 11 Mar 2006 02:48:20 +0000
(
02:48
+0000)
committer
Gerald (Jerry) Carter
<jerry@samba.org>
Wed, 10 Oct 2007 16:15:16 +0000
(11:15 -0500)
Jeremy
source/libmsrpc/cac_lsarpc.c
patch
|
blob
|
history
diff --git
a/source/libmsrpc/cac_lsarpc.c
b/source/libmsrpc/cac_lsarpc.c
index 1877e9cd7efcfa0d6e1c1f106403f0028248cc57..13aaa017548202d7acfcbcf631e4a4678cdf5b8a 100644
(file)
--- a/
source/libmsrpc/cac_lsarpc.c
+++ b/
source/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;
}