From 7b300673c62b16ad0a90832bfae14863d4f7ab8b Mon Sep 17 00:00:00 2001 From: bobijam Date: Fri, 14 Mar 2008 06:27:13 +0000 Subject: [PATCH] Branch b1_6 b=14321 according to bz# 15209, better make sure obd is non NULL before referencing its member. --- lustre/mgs/lproc_mgs.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lustre/mgs/lproc_mgs.c b/lustre/mgs/lproc_mgs.c index 66b2825..5a4f329 100644 --- a/lustre/mgs/lproc_mgs.c +++ b/lustre/mgs/lproc_mgs.c @@ -95,11 +95,12 @@ int lproc_mgs_setup(struct obd_device *obd) int lproc_mgs_cleanup(struct obd_device *obd) { - struct mgs_obd *mgs = &obd->u.mgs; + struct mgs_obd *mgs; if (!obd) return -EINVAL; + mgs = &obd->u.mgs; if (mgs->mgs_proc_live) { /* Should be no live entries */ LASSERT(mgs->mgs_proc_live->subdir == NULL); -- 1.8.3.1