From: Stefan Metzmacher Date: Mon, 29 Mar 2010 16:23:40 +0000 (+0200) Subject: s3:libsmb: don't let cli_shutdown() segfault with a NULL cli_state X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e6d5238c8403e848a43e6c7a2d3ca6422e8becd4;p=thirdparty%2Fsamba.git 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 --- 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,