Whamcloud - gitweb
small fix to avoid using NULL pointer
authortappro <tappro>
Thu, 31 Aug 2006 21:48:05 +0000 (21:48 +0000)
committertappro <tappro>
Thu, 31 Aug 2006 21:48:05 +0000 (21:48 +0000)
lustre/cmm/cmm_device.c

index f8e346d..a0a9476 100644 (file)
@@ -180,8 +180,10 @@ static void cmm_device_shutdown(const struct lu_context *ctx,
         spin_unlock(&cm->cmm_tgt_guard);
 
         ls = cm->cmm_md_dev.md_lu_dev.ld_site;
-        fld_client_fini(ls->ls_client_fld);
-        OBD_FREE_PTR(ls->ls_client_fld);
+        if (ls->ls_client_fld != NULL) {
+                fld_client_fini(ls->ls_client_fld);
+                OBD_FREE_PTR(ls->ls_client_fld);
+        }
         ls->ls_client_fld = NULL;
 
         EXIT;