From 0bebcbcf5e33e61ed146edef4f91b5f621512a8f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=BD=D0=B0=D0=B1?= Date: Thu, 17 Mar 2022 18:22:13 +0100 Subject: [PATCH] get_key_material_https: removed bogus free() call 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<84>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 644dd26859..f77becd6a5 100644 --- a/lib/libzfs/libzfs_crypto.c +++ b/lib/libzfs/libzfs_crypto.c @@ -606,7 +606,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));