|
Tomas Bzatek |
2f6b05 |
From 74324a4120a44120556af41eb9480c5b2492d1fb Mon Sep 17 00:00:00 2001
|
|
Tomas Bzatek |
2f6b05 |
From: Tomas Bzatek <tbzatek@redhat.com>
|
|
Tomas Bzatek |
2f6b05 |
Date: Fri, 9 Feb 2024 17:38:45 +0100
|
|
Tomas Bzatek |
2f6b05 |
Subject: [PATCH] linux: Explicitly initialize auto-cleanup variables
|
|
Tomas Bzatek |
2f6b05 |
|
|
Tomas Bzatek |
2f6b05 |
gcc complains about potentially uninitialized variables.
|
|
Tomas Bzatek |
2f6b05 |
|
|
Tomas Bzatek |
2f6b05 |
Signed-off-by: Tomas Bzatek <tbzatek@redhat.com>
|
|
Tomas Bzatek |
2f6b05 |
---
|
|
Tomas Bzatek |
2f6b05 |
src/nvme/linux.c | 4 ++--
|
|
Tomas Bzatek |
2f6b05 |
1 file changed, 2 insertions(+), 2 deletions(-)
|
|
Tomas Bzatek |
2f6b05 |
|
|
Tomas Bzatek |
2f6b05 |
diff --git a/src/nvme/linux.c b/src/nvme/linux.c
|
|
Tomas Bzatek |
2f6b05 |
index f0723193..e29d9e72 100644
|
|
Tomas Bzatek |
2f6b05 |
--- a/src/nvme/linux.c
|
|
Tomas Bzatek |
2f6b05 |
+++ b/src/nvme/linux.c
|
|
Tomas Bzatek |
2f6b05 |
@@ -725,7 +725,7 @@ int nvme_gen_dhchap_key(char *hostnqn, enum nvme_hmac_alg hmac,
|
|
Tomas Bzatek |
2f6b05 |
unsigned char *key)
|
|
Tomas Bzatek |
2f6b05 |
{
|
|
Tomas Bzatek |
2f6b05 |
const char hmac_seed[] = "NVMe-over-Fabrics";
|
|
Tomas Bzatek |
2f6b05 |
- _cleanup_hmac_ctx_ HMAC_CTX *hmac_ctx;
|
|
Tomas Bzatek |
2f6b05 |
+ _cleanup_hmac_ctx_ HMAC_CTX *hmac_ctx = NULL;
|
|
Tomas Bzatek |
2f6b05 |
const EVP_MD *md;
|
|
Tomas Bzatek |
2f6b05 |
|
|
Tomas Bzatek |
2f6b05 |
ENGINE_load_builtin_engines();
|
|
Tomas Bzatek |
2f6b05 |
@@ -881,7 +881,7 @@ int nvme_gen_dhchap_key(char *hostnqn, enum nvme_hmac_alg hmac,
|
|
Tomas Bzatek |
2f6b05 |
{
|
|
Tomas Bzatek |
2f6b05 |
const char hmac_seed[] = "NVMe-over-Fabrics";
|
|
Tomas Bzatek |
2f6b05 |
OSSL_PARAM params[2], *p = params;
|
|
Tomas Bzatek |
2f6b05 |
- _cleanup_ossl_lib_ctx_ OSSL_LIB_CTX *lib_ctx;
|
|
Tomas Bzatek |
2f6b05 |
+ _cleanup_ossl_lib_ctx_ OSSL_LIB_CTX *lib_ctx = NULL;
|
|
Tomas Bzatek |
2f6b05 |
_cleanup_evp_mac_ctx_ EVP_MAC_CTX *mac_ctx = NULL;
|
|
Tomas Bzatek |
2f6b05 |
_cleanup_evp_mac_ EVP_MAC *mac = NULL;
|
|
Tomas Bzatek |
2f6b05 |
char *progq = NULL;
|
|
Tomas Bzatek |
2f6b05 |
--
|
|
Tomas Bzatek |
2f6b05 |
2.43.0
|
|
Tomas Bzatek |
2f6b05 |
|