diff options
Diffstat (limited to 'source4/libcli/auth/gensec.c')
-rw-r--r-- | source4/libcli/auth/gensec.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/source4/libcli/auth/gensec.c b/source4/libcli/auth/gensec.c index 353c5f562d..a00a36e171 100644 --- a/source4/libcli/auth/gensec.c +++ b/source4/libcli/auth/gensec.c @@ -452,11 +452,8 @@ void gensec_end(struct gensec_security **gensec_security) } (*gensec_security)->private_data = NULL; - if (!(*gensec_security)->subcontext) { - /* don't destory this if this is a subcontext - it belongs to the parent */ - talloc_free(*gensec_security); - } - gensec_security = NULL; + talloc_free(*gensec_security); + *gensec_security = NULL; } /** |