We know that 'bm_lockres' is NULL here, so 'lockres_free(bm_lockres)' is a no-op. According to resource handling in case of error a few lines below, it is likely that 'bitmap_free(bitmap)' was expected instead. Fixes: b98938d16a10 ("md-cluster: introduce cluster_check_sync_size")
Unified · Split
| @@ -1127,7 +1127,7 @@ int cluster_check_sync_size(struct mddev *mddev) · 1126 unmodified lines | ||
| 1127 | 1127 | bm_lockres = lockres_init(mddev, str, NULL, 1); |
| 1128 | 1128 | if (!bm_lockres) { |
| 1129 | 1129 | pr_err("md-cluster: Cannot initialize %s\n", str); |
| 1130 | − lockres_free(bm_lockres); | |
| 1130 | + bitmap_free(bitmap); | |
| 1131 | 1131 | return -1; |
| 1132 | 1132 | } |
| 1133 | 1133 | bm_lockres->flags |= DLM_LKF_NOQUEUE; |