diff mbox

[linux-cifs-client] Error segmentation fault.

Message ID 20100307190019.6291bbd2@tlielax.poochiereds.net (mailing list archive)
State New, archived
Headers show

Commit Message

Jeff Layton March 8, 2010, midnight UTC
None
diff mbox

Patch

From cff3f7cb2b94aec118f27ee8dd904ef216489938 Mon Sep 17 00:00:00 2001
From: Jeff Layton <jlayton@redhat.com>
Date: Sun, 7 Mar 2010 18:49:33 -0500
Subject: [PATCH] mount.cifs: check for NULL addr pointer before handling scopeid

Signed-off-by: Jeff Layton <jlayton@redhat.com>
---
 mount.cifs.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/mount.cifs.c b/mount.cifs.c
index 5237476..4e38415 100644
--- a/mount.cifs.c
+++ b/mount.cifs.c
@@ -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;
-- 
1.6.6.1