diff options
author | Pavel Snajdr <[email protected]> | 2020-09-07 17:27:51 +0200 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2020-09-15 15:55:45 -0700 |
commit | a1c5578ce0ffaa5baaa22177cafea36aa8145d8d (patch) | |
tree | c5b5c89b6a3556fcf93093ce65094944890a802b /module | |
parent | 8c0b16e6e9c33507a0674fada782046e895b06d7 (diff) |
dmu_redact_snap: fix possible memleak
Reviewed-by: Ryan Moeller <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Pavel Snajdr <[email protected]>
Closes #10879
Diffstat (limited to 'module')
-rw-r--r-- | module/zfs/dmu_redact.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/module/zfs/dmu_redact.c b/module/zfs/dmu_redact.c index b091df925..c53fba75c 100644 --- a/module/zfs/dmu_redact.c +++ b/module/zfs/dmu_redact.c @@ -1078,6 +1078,8 @@ dmu_redact_snap(const char *snapname, nvlist_t *redactnvl, dsl_pool_rele(dp, FTAG); kmem_free(newredactbook, sizeof (char) * ZFS_MAX_DATASET_NAME_LEN); + if (args != NULL) + kmem_free(args, numsnaps * sizeof (*args)); return (SET_ERROR(ENAMETOOLONG)); } err = dsl_bookmark_lookup(dp, newredactbook, NULL, &bookmark); |