Whamcloud - gitweb
LU-658 liblustre: free sbi too early
[fs/lustre-release.git] / lustre / liblustre / super.c
index 9e6972f..3f3788a 100644 (file)
@@ -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(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;
 }
         liblustre_wait_idle();
         return err;
 }