Skip to content

Commit 2faad50

Browse files
tbzatekigaw
authored andcommitted
linux: Explicitly initialize auto-cleanup variables
gcc complains about potentially uninitialized variables. Signed-off-by: Tomas Bzatek <[email protected]>
1 parent 24a5580 commit 2faad50

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/nvme/linux.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -725,7 +725,7 @@ int nvme_gen_dhchap_key(char *hostnqn, enum nvme_hmac_alg hmac,
725725
unsigned char *key)
726726
{
727727
const char hmac_seed[] = "NVMe-over-Fabrics";
728-
_cleanup_hmac_ctx_ HMAC_CTX *hmac_ctx;
728+
_cleanup_hmac_ctx_ HMAC_CTX *hmac_ctx = NULL;
729729
const EVP_MD *md;
730730

731731
ENGINE_load_builtin_engines();
@@ -881,7 +881,7 @@ int nvme_gen_dhchap_key(char *hostnqn, enum nvme_hmac_alg hmac,
881881
{
882882
const char hmac_seed[] = "NVMe-over-Fabrics";
883883
OSSL_PARAM params[2], *p = params;
884-
_cleanup_ossl_lib_ctx_ OSSL_LIB_CTX *lib_ctx;
884+
_cleanup_ossl_lib_ctx_ OSSL_LIB_CTX *lib_ctx = NULL;
885885
_cleanup_evp_mac_ctx_ EVP_MAC_CTX *mac_ctx = NULL;
886886
_cleanup_evp_mac_ EVP_MAC *mac = NULL;
887887
char *progq = NULL;

0 commit comments

Comments
 (0)