From 218322d65b7d33ea185c7186b432f684e440eada Mon Sep 17 00:00:00 2001 From: Bobi Jam Date: Tue, 7 Feb 2012 02:29:07 +0800 Subject: [PATCH 1/1] LU-658 liblustre: free sbi too early llu_fsop_gone will do the job if llu_ffswop_mount runs ok. Signed-off-by: Bobi Jam Change-Id: I1e3a103589fc5221cc481431c4477c4597cab738 Reviewed-on: http://review.whamcloud.com/2107 Tested-by: Jenkins Tested-by: Maloo Reviewed-by: Andreas Dilger Reviewed-by: Alexey Lyashkov --- lustre/liblustre/super.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lustre/liblustre/super.c b/lustre/liblustre/super.c index 9e6972f..3f3788a 100644 --- a/lustre/liblustre/super.c +++ b/lustre/liblustre/super.c @@ -2053,7 +2053,8 @@ out_free: OBD_FREE(osc, strlen(lprof->lp_dt) + instlen + 2); if (mdc) OBD_FREE(mdc, strlen(lprof->lp_md) + instlen + 2); - OBD_FREE(sbi, sizeof(*sbi)); + if (err != 0) + OBD_FREE(sbi, sizeof(*sbi)); liblustre_wait_idle(); return err; } -- 1.8.3.1