summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVolker Lendecke <vlendec@samba.org>2006-04-23 10:59:44 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:16:27 -0500
commit22c4ad8a10c920f74d7a1ac5ce0e186303f754ac (patch)
treea7633ad7b254fe21f8155d77c3f874bd6eccfdfd
parent11868fe3ba0882c2743e7317a1337b06425c9cc8 (diff)
downloadsamba-22c4ad8a10c920f74d7a1ac5ce0e186303f754ac.tar.gz
samba-22c4ad8a10c920f74d7a1ac5ce0e186303f754ac.tar.bz2
samba-22c4ad8a10c920f74d7a1ac5ce0e186303f754ac.zip
r15173: Fix a non-critical memleak
(This used to be commit bb8c69162f9228343e0b05812e0e5a9ca4eb56bf)
-rw-r--r--source3/utils/net_sam.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/source3/utils/net_sam.c b/source3/utils/net_sam.c
index 945afb3a21..0bf662c271 100644
--- a/source3/utils/net_sam.c
+++ b/source3/utils/net_sam.c
@@ -462,7 +462,6 @@ static int net_sam_createbuiltingroup(int argc, const char **argv)
{
NTSTATUS status;
uint32 rid;
- TALLOC_CTX *ctx;
enum SID_NAME_USE type;
fstring groupname;
DOM_SID sid;
@@ -478,17 +477,13 @@ static int net_sam_createbuiltingroup(int argc, const char **argv)
return -1;
}
- if ( (ctx = talloc_init("net_sam_createbuiltingroup")) == NULL ) {
- d_fprintf( stderr, "Memory allocation error\n");
- return -1;
- }
-
/* validate the name and get the group */
fstrcpy( groupname, "BUILTIN\\" );
fstrcat( groupname, argv[0] );
- if ( !lookup_name(ctx, groupname, LOOKUP_NAME_ALL, NULL, NULL, &sid, &type)) {
+ if ( !lookup_name(tmp_talloc_ctx(), groupname, LOOKUP_NAME_ALL, NULL,
+ NULL, &sid, &type)) {
d_fprintf(stderr, "%s is not a BUILTIN group\n", argv[0]);
return -1;
}