From a71b9135710995a381f0bfaea29fe1a9da93ce20 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Wed, 20 Oct 2004 02:10:46 +0000 Subject: r3075: Initialise (and check for intialisation) of the private pointer to ensure we don't segfault on the cleanup from an incomplete schannel bind. Andrew Bartlett (This used to be commit 173f29a1d8db111d5adb258eead5379d681d3bb2) --- source4/libcli/auth/schannel.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'source4/libcli') diff --git a/source4/libcli/auth/schannel.c b/source4/libcli/auth/schannel.c index aa89e7b84f..2e752f0172 100644 --- a/source4/libcli/auth/schannel.c +++ b/source4/libcli/auth/schannel.c @@ -278,8 +278,10 @@ NTSTATUS schannel_sign_packet(struct schannel_state *state, */ void schannel_end(struct schannel_state **state) { - talloc_destroy((*state)->mem_ctx); - (*state) = NULL; + if (*state) { + talloc_destroy((*state)->mem_ctx); + (*state) = NULL; + } } /* -- cgit