s3:smbd: Fix bug 6696
authorTimothy Miller <theosib@gmail.com>
Mon, 7 Sep 2009 10:01:58 +0000 (12:01 +0200)
committerKarolin Seeger <kseeger@samba.org>
Wed, 13 Jan 2010 13:01:06 +0000 (14:01 +0100)
smbd crashes when using mdns (not avahi) support
(cherry picked from commit b6ce8928e88d92c5a5d703b52e6dc95a5c79d732)

source/smbd/dnsregister.c

index ff9be435a6239e45f168de75624fb46981a4cc78..f02739ef8dfed67b1f8dcbb8e079e3ececce1a10 100644 (file)
@@ -168,7 +168,7 @@ bool dns_register_smbd_reply(struct dns_reg_state *dns_state,
 {
        int mdnsd_conn_fd = -1;
 
-       if (dns_state->srv_ref == NULL) {
+       if ((dns_state == NULL) || (dns_state->srv_ref == NULL)) {
                return false;
        }