From: tappro Date: Thu, 31 Aug 2006 21:48:05 +0000 (+0000) Subject: small fix to avoid using NULL pointer X-Git-Tag: v1_8_0_110~486^2~1046 X-Git-Url: https://git.whamcloud.com/gitweb?a=commitdiff_plain;h=064659d51964b8029d613fb4a5ae9994793a853b;p=fs%2Flustre-release.git small fix to avoid using NULL pointer --- diff --git a/lustre/cmm/cmm_device.c b/lustre/cmm/cmm_device.c index f8e346d..a0a9476 100644 --- a/lustre/cmm/cmm_device.c +++ b/lustre/cmm/cmm_device.c @@ -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;