summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
Diffstat (limited to 'source3')
-rw-r--r--source3/libsmb/clientgen.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/source3/libsmb/clientgen.c b/source3/libsmb/clientgen.c
index 1b43809138..c530c1434f 100644
--- a/source3/libsmb/clientgen.c
+++ b/source3/libsmb/clientgen.c
@@ -737,6 +737,9 @@ static void _cli_shutdown(struct cli_state *cli)
void cli_shutdown(struct cli_state *cli)
{
struct cli_state *cli_head;
+ if (cli == NULL) {
+ return;
+ }
DLIST_HEAD(cli, cli_head);
if (cli_head == cli) {
/*