Whamcloud - gitweb
LU-5324 lfsck: invalidly memory access in lfsck_del_target
[fs/lustre-release.git] / lustre / lfsck / lfsck_lib.c
index fe3fcad..430522b 100644 (file)
@@ -2636,7 +2636,7 @@ void lfsck_del_target(const struct lu_env *env, struct dt_device *key,
 {
        struct lfsck_instance   *lfsck;
        struct lfsck_tgt_descs  *ltds;
-       struct lfsck_tgt_desc   *ltd    = NULL;
+       struct lfsck_tgt_desc   *ltd;
        struct list_head        *head;
 
        if (for_ost)
@@ -2655,6 +2655,7 @@ void lfsck_del_target(const struct lu_env *env, struct dt_device *key,
                }
        }
 
+       ltd = NULL;
        lfsck = __lfsck_instance_find(key, true, false);
        spin_unlock(&lfsck_instance_lock);
        if (unlikely(lfsck == NULL))