37 lines
940 B
Plaintext
37 lines
940 B
Plaintext
|
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 +++----
|
||
|
1 files changed, 3 insertions(+), 4 deletions(-)
|
||
|
|
||
|
diff --git a/tmp/linux-2.6.32-sle11sp1/fs/novfs/scope.c b/tmp/linux-2.6.32-sle11sp1/fs/novfs/scope.c
|
||
|
index 6de40a8..5b408f6 100644
|
||
|
--- a/fs/novfs/scope.c
|
||
|
+++ b/fs/novfs/scope.c
|
||
|
@@ -170,10 +170,9 @@ static struct novfs_scope_list *Scope_Find_Scope(int Create)
|
||
|
kfree(scope);
|
||
|
scope = NULL;
|
||
|
}
|
||
|
- }
|
||
|
-
|
||
|
- if (addscope) {
|
||
|
- novfs_add_to_root(scope->ScopeUserName);
|
||
|
+
|
||
|
+ if (scope && addscope)
|
||
|
+ novfs_add_to_root(scope->ScopeUserName);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
--
|
||
|
1.6.4.2
|
||
|
|