summaryrefslogtreecommitdiff
path: root/source3/libsmb
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2010-03-29 15:07:34 +0200
committerStefan Metzmacher <metze@samba.org>2010-03-29 18:11:14 +0200
commit47e10ab9a85960c78af807b66b99bcd139713644 (patch)
tree3c8adbc14ce36e43d0fc2249c28af1553e5528ee /source3/libsmb
parent1ec2b2f7f328abd0111f1dd871a032ea32f5e573 (diff)
downloadsamba-47e10ab9a85960c78af807b66b99bcd139713644.tar.gz
samba-47e10ab9a85960c78af807b66b99bcd139713644.tar.bz2
samba-47e10ab9a85960c78af807b66b99bcd139713644.zip
s3:libsmb: don't let cli_shutdown() segfault with a NULL cli_state
metze
Diffstat (limited to 'source3/libsmb')
-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) {
/*