md-cluster: add missed lockres_free

We also need to free the lock resource before goto out.

Reviewed-by: Goldwyn Rodrigues <rgoldwyn@suse.com>
Signed-off-by: Guoqing Jiang <gqjiang@suse.com>
Signed-off-by: NeilBrown <neilb@suse.com>
This commit is contained in:
Guoqing Jiang 2015-07-10 17:01:20 +08:00 committed by NeilBrown
parent b2b9bfff0a
commit 6e6d9f2cda

View File

@ -647,8 +647,10 @@ static int gather_all_resync_info(struct mddev *mddev, int total_slots)
lockres_free(bm_lockres);
continue;
}
if (ret)
if (ret) {
lockres_free(bm_lockres);
goto out;
}
/* TODO: Read the disk bitmap sb and check if it needs recovery */
dlm_unlock_sync(bm_lockres);
lockres_free(bm_lockres);