2010-07-07 11:12:45 +00:00
|
|
|
From: Sankar P <psankar@novell.com>
|
|
|
|
Subject: novfs: fix an oops in novfs scope-finding code
|
|
|
|
References: bnc#588579
|
|
|
|
Patch-mainline: no
|
|
|
|
|
|
|
|
This patch removes an attempt to dereference a NULL pointer,
|
|
|
|
on failed memory allocation. The addscope boolean takes care
|
|
|
|
of the ScopeUserName field's validity.
|
|
|
|
|
|
|
|
Signed-off-by: Sankar P <psankar@novell.com>
|
|
|
|
Acked-by: Jan Kara <jack@suse.cz>
|
|
|
|
---
|
|
|
|
fs/novfs/scope.c | 7 +++----
|
2011-04-19 20:09:59 +00:00
|
|
|
1 file changed, 3 insertions(+), 4 deletions(-)
|
2010-07-07 11:12:45 +00:00
|
|
|
|
|
|
|
--- a/fs/novfs/scope.c
|
|
|
|
+++ b/fs/novfs/scope.c
|
2011-04-19 20:09:59 +00:00
|
|
|
@@ -170,10 +170,9 @@ static struct novfs_scope_list *Scope_Fi
|
2010-07-07 11:12:45 +00:00
|
|
|
kfree(scope);
|
|
|
|
scope = NULL;
|
|
|
|
}
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- if (addscope) {
|
|
|
|
- novfs_add_to_root(scope->ScopeUserName);
|
|
|
|
+
|
|
|
|
+ if (scope && addscope)
|
|
|
|
+ novfs_add_to_root(scope->ScopeUserName);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|