From 85aae5e96363d0b5b03d31fb36465121d3381cb2 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Mon, 29 Mar 2010 18:23:40 +0200 Subject: [PATCH] s3:libsmb: don't let cli_shutdown() segfault with a NULL cli_state metze (similar to commit 47e10ab9a85960c78af807b66b99bcd139713644) --- source3/libsmb/clientgen.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/source3/libsmb/clientgen.c b/source3/libsmb/clientgen.c index 1ea8033fc62..b9f0024892b 100644 --- a/source3/libsmb/clientgen.c +++ b/source3/libsmb/clientgen.c @@ -695,6 +695,10 @@ void cli_nt_pipes_close(struct cli_state *cli) void cli_shutdown(struct cli_state *cli) { + if (cli == NULL) { + return; + } + if (cli->prev == NULL) { /* * Possible head of a DFS list, -- 2.11.4.GIT