diff --git a/module/zfs/dsl_crypt.c b/module/zfs/dsl_crypt.c index 33c21e86c4..26d4c2fe7e 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); }