From 2b5aec5288360f80f1d048e87e5a0b281af0e4eb 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 825acf42a2da..816291360648 100644 --- a/lib/libzfs/libzfs_crypto.c +++ b/lib/libzfs/libzfs_crypto.c @@ -624,7 +624,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));