summaryrefslogtreecommitdiff
path: root/source4/libcli
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2004-10-20 02:10:46 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:01:56 -0500
commita71b9135710995a381f0bfaea29fe1a9da93ce20 (patch)
tree45e2a9fa2fdc5b4fb5074dc3ee93a2e25f88d549 /source4/libcli
parent1ee3a7419e04b0d7574792ceebecc89b4a849a73 (diff)
downloadsamba-a71b9135710995a381f0bfaea29fe1a9da93ce20.tar.gz
samba-a71b9135710995a381f0bfaea29fe1a9da93ce20.tar.bz2
samba-a71b9135710995a381f0bfaea29fe1a9da93ce20.zip
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)
Diffstat (limited to 'source4/libcli')
-rw-r--r--source4/libcli/auth/schannel.c6
1 files changed, 4 insertions, 2 deletions
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;
+ }
}
/*