aboutsummaryrefslogtreecommitdiffstats
path: root/module/zfs/dsl_crypt.c
diff options
context:
space:
mode:
authorRyan Moeller <[email protected]>2020-09-03 19:23:30 +0000
committerBrian Behlendorf <[email protected]>2020-09-25 13:11:53 -0700
commit863e38453ee537ab59b3729b32d9d88ca2b884bc (patch)
tree4b6e90b0824b3f814257dd9c2f48fee2c022f98e /module/zfs/dsl_crypt.c
parentbd76bcb36dcdc7264f17a64b506fe2a1fdf266b9 (diff)
Prune dead branch reported by Coverity
wkey is NULL at every `goto error;`. dcp is never NULL. Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ryan Moeller <[email protected]> Closes #10884
Diffstat (limited to 'module/zfs/dsl_crypt.c')
-rw-r--r--module/zfs/dsl_crypt.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/module/zfs/dsl_crypt.c b/module/zfs/dsl_crypt.c
index 33c21e86c..26d4c2fe7 100644
--- a/module/zfs/dsl_crypt.c
+++ b/module/zfs/dsl_crypt.c
@@ -235,11 +235,7 @@ dsl_crypto_params_create_nvlist(dcp_cmd_t cmd, nvlist_t *props,
return (0);
error:
- if (wkey != NULL)
- dsl_wrapping_key_free(wkey);
- if (dcp != NULL)
- kmem_free(dcp, sizeof (dsl_crypto_params_t));
-
+ kmem_free(dcp, sizeof (dsl_crypto_params_t));
*dcp_out = NULL;
return (ret);
}