From 82b69cf7907132b4b4064aa734a8e8b15a3c0449 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) (cherry picked from commit 957c0d4a5ee67ac70e576155a0f2f6f84cdb1596) Signed-off-by: Stefan Metzmacher (cherry picked from commit e6d5238c8403e848a43e6c7a2d3ca6422e8becd4) --- source3/libsmb/clientgen.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/source3/libsmb/clientgen.c b/source3/libsmb/clientgen.c index 356db57730d..5dc43e93ad6 100644 --- a/source3/libsmb/clientgen.c +++ b/source3/libsmb/clientgen.c @@ -599,6 +599,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