Fix bug #8974 - Kernel oplocks are broken when uid(file) != uid(process).
[samba.git] / client / mount.cifs.c
index 0b8d5b400f4fe840747ad7af2b6bf946accb3a58..1b472c2ea50c8dc4998355999ea0619d9b9a14b6 100644 (file)
@@ -1648,7 +1648,7 @@ mount_retry:
                }
        }
 
-       if (addr->ai_addr->sa_family == AF_INET6 && addr6->sin6_scope_id) {
+       if (addr && addr->ai_addr->sa_family == AF_INET6 && addr6->sin6_scope_id) {
                strlcat(options, "%", options_size);
                current_len = strnlen(options, options_size);
                optionstail = options + current_len;