mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-11-17 01:51:00 +03:00
Fix snap_obj_array memory leak in check_filesystem()
Use goto out instead of return for early exit to make sure snap_obj_array is freed. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Chunwei Chen <david.chen@nutanix.com> Closes #15516
This commit is contained in:
parent
2319656802
commit
da51bd17e5
@ -425,8 +425,10 @@ check_filesystem(spa_t *spa, uint64_t head_ds, zbookmark_err_phys_t *zep,
|
||||
dsl_dataset_rele_flags(ds, DS_HOLD_FLAG_DECRYPT, FTAG);
|
||||
}
|
||||
|
||||
if (zap_clone == 0 || aff_snap_count == 0)
|
||||
return (0);
|
||||
if (zap_clone == 0 || aff_snap_count == 0) {
|
||||
error = 0;
|
||||
goto out;
|
||||
}
|
||||
|
||||
/* Check clones. */
|
||||
zap_cursor_t *zc;
|
||||
|
Loading…
Reference in New Issue
Block a user