mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 10:37:35 +03:00
dmu_send: redacted: fix memory leak on invalid redaction/from bookmark
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Matt Ahrens <matt@delphix.com> Signed-off-by: Christian Schwarz <me@cschwarz.com> Closes #9867
This commit is contained in:
committed by
Brian Behlendorf
parent
f658f61c72
commit
0ea03c7c82
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user