summaryrefslogtreecommitdiffstats
path: root/source4/auth/gensec
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2010-09-26 21:11:42 -0700
committerAndrew Tridgell <tridge@samba.org>2010-09-26 21:12:09 -0700
commit06274bd87080f29f0be2b49a0ea65bf98b6e0b0c (patch)
treec32e9e6491450da9ec272f3fca8fbbf53dba7991 /source4/auth/gensec
parentf9ba8f5d8af87c06e42a9c0c20b70171095c12b3 (diff)
downloadsamba-06274bd87080f29f0be2b49a0ea65bf98b6e0b0c.tar.gz
samba-06274bd87080f29f0be2b49a0ea65bf98b6e0b0c.tar.xz
samba-06274bd87080f29f0be2b49a0ea65bf98b6e0b0c.zip
s4-gensec: fixed a valgrind error in gensec
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'source4/auth/gensec')
-rw-r--r--source4/auth/gensec/gensec.c14
1 files changed, 2 insertions, 12 deletions
diff --git a/source4/auth/gensec/gensec.c b/source4/auth/gensec/gensec.c
index 7220d0e836..7f76643bf7 100644
--- a/source4/auth/gensec/gensec.c
+++ b/source4/auth/gensec/gensec.c
@@ -521,19 +521,9 @@ static NTSTATUS gensec_start(TALLOC_CTX *mem_ctx,
return NT_STATUS_INTERNAL_ERROR;
}
- (*gensec_security) = talloc(mem_ctx, struct gensec_security);
+ (*gensec_security) = talloc_zero(mem_ctx, struct gensec_security);
NT_STATUS_HAVE_NO_MEMORY(*gensec_security);
- (*gensec_security)->ops = NULL;
- (*gensec_security)->local_addr = NULL;
- (*gensec_security)->remote_addr = NULL;
- (*gensec_security)->private_data = NULL;
-
- ZERO_STRUCT((*gensec_security)->target);
-
- (*gensec_security)->subcontext = false;
- (*gensec_security)->want_features = 0;
-
(*gensec_security)->event_ctx = ev;
SMB_ASSERT(settings->lp_ctx != NULL);
(*gensec_security)->settings = talloc_reference(*gensec_security, settings);
@@ -554,7 +544,7 @@ _PUBLIC_ NTSTATUS gensec_subcontext_start(TALLOC_CTX *mem_ctx,
struct gensec_security *parent,
struct gensec_security **gensec_security)
{
- (*gensec_security) = talloc(mem_ctx, struct gensec_security);
+ (*gensec_security) = talloc_zero(mem_ctx, struct gensec_security);
NT_STATUS_HAVE_NO_MEMORY(*gensec_security);
(**gensec_security) = *parent;