mount.cifs: check for NULL addr pointer before handling scopeid
authorJeff Layton <jlayton@redhat.com>
Sun, 7 Mar 2010 23:49:33 +0000 (18:49 -0500)
committerJeff Layton <jlayton@redhat.com>
Sun, 7 Mar 2010 23:49:33 +0000 (18:49 -0500)
Signed-off-by: Jeff Layton <jlayton@redhat.com>
mount.cifs.c

index 5237476fb855b93474f71451764cf63bbe9cce76..4e384153f8956e39dcb3ed4b71a3cf1898e0c20c 100644 (file)
@@ -1604,7 +1604,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;