summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2010-03-29 18:23:40 +0200
committerKarolin Seeger <kseeger@samba.org>2010-05-06 14:08:36 +0200
commit82b69cf7907132b4b4064aa734a8e8b15a3c0449 (patch)
tree7551d2341b389059fb9985c868727511c1fbb0c8
parent97b84c82201ffc0689f64622125698eabc419c54 (diff)
downloadsamba-82b69cf7907132b4b4064aa734a8e8b15a3c0449.tar.gz
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 <metze@samba.org> (cherry picked from commit e6d5238c8403e848a43e6c7a2d3ca6422e8becd4)
-rw-r--r--source3/libsmb/clientgen.c4
1 files changed, 4 insertions, 0 deletions
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,