diff options
author | Christian Schwarz <[email protected]> | 2020-01-18 21:40:30 +0100 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2020-01-23 09:34:31 -0800 |
commit | 0ea03c7c8273c2a1a48b86c397c727c076c86a06 (patch) | |
tree | d4bd52f71cbe335fe6a9bfe5fa30bc316814d470 /module | |
parent | f658f61c722872753e8899a118e11546f136e85a (diff) |
dmu_send: redacted: fix memory leak on invalid redaction/from bookmark
Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: Matt Ahrens <[email protected]>
Signed-off-by: Christian Schwarz <[email protected]>
Closes #9867
Diffstat (limited to 'module')
-rw-r--r-- | module/zfs/dmu_send.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/module/zfs/dmu_send.c b/module/zfs/dmu_send.c index 62de978d3..469959302 100644 --- a/module/zfs/dmu_send.c +++ b/module/zfs/dmu_send.c @@ -2342,12 +2342,6 @@ dmu_send_impl(struct dmu_send_params *dspp) return (err); } - from_arg = kmem_zalloc(sizeof (*from_arg), KM_SLEEP); - to_arg = kmem_zalloc(sizeof (*to_arg), KM_SLEEP); - rlt_arg = kmem_zalloc(sizeof (*rlt_arg), KM_SLEEP); - smt_arg = kmem_zalloc(sizeof (*smt_arg), KM_SLEEP); - spt_arg = kmem_zalloc(sizeof (*spt_arg), KM_SLEEP); - /* * If we're doing a redacted send, hold the bookmark's redaction list. */ @@ -2382,6 +2376,12 @@ dmu_send_impl(struct dmu_send_params *dspp) dsl_dataset_long_hold(to_ds, FTAG); + from_arg = kmem_zalloc(sizeof (*from_arg), KM_SLEEP); + to_arg = kmem_zalloc(sizeof (*to_arg), KM_SLEEP); + rlt_arg = kmem_zalloc(sizeof (*rlt_arg), KM_SLEEP); + smt_arg = kmem_zalloc(sizeof (*smt_arg), KM_SLEEP); + spt_arg = kmem_zalloc(sizeof (*spt_arg), KM_SLEEP); + drr = create_begin_record(dspp, os, featureflags); dssp = setup_send_progress(dspp); |