From ebcf12f763130d17daeac7f0065adc924eff3847 Mon Sep 17 00:00:00 2001 From: Harry Sintonen Date: Sun, 13 Mar 2022 22:15:40 +0200 Subject: [PATCH] get_key_material_https: removed bogus free() call MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The get_key_material_https() function error code path had a bogus free() call, either resulting in double-free or free() of undefined pointer. Reviewed-by: Brian Behlendorf Reviewed-by: Ahelenia ZiemiaƄska Co-authored-by: Harry Sintonen Signed-off-by: Harry Sintonen Closes #13198 --- lib/libzfs/libzfs_crypto.c | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/libzfs/libzfs_crypto.c b/lib/libzfs/libzfs_crypto.c index e7d3b09c67..777ef21a5f 100644 --- a/lib/libzfs/libzfs_crypto.c +++ b/lib/libzfs/libzfs_crypto.c @@ -614,7 +614,6 @@ get_key_material_https(libzfs_handle_t *hdl, const char *uri, kfdok: if ((key = fdopen(kfd, "r+")) == NULL) { ret = errno; - free(path); (void) close(kfd); zfs_error_aux(hdl, dgettext(TEXT_DOMAIN, "Couldn't reopen temporary file: %s"), strerror(ret));