@@ -74,7 +74,7 @@ static int __nvme_set_attr(const char *path, const char *value)
7474
7575int libnvme_set_attr (const char * dir , const char * attr , const char * value )
7676{
77- _cleanup_free_ char * path = NULL ;
77+ __cleanup_free char * path = NULL ;
7878 int ret ;
7979
8080 ret = asprintf (& path , "%s/%s" , dir , attr );
@@ -115,7 +115,7 @@ static char *__nvme_get_attr(const char *path)
115115
116116__public char * libnvme_get_attr (const char * dir , const char * attr )
117117{
118- _cleanup_free_ char * path = NULL ;
118+ __cleanup_free char * path = NULL ;
119119 int ret ;
120120
121121 ret = asprintf (& path , "%s/%s" , dir , attr );
@@ -304,7 +304,7 @@ static int derive_retained_key(struct libnvme_global_ctx *ctx,
304304 size_t key_len )
305305{
306306 _cleanup_evp_pkey_ctx_ EVP_PKEY_CTX * ectx = NULL ;
307- _cleanup_free_ uint8_t * hkdf_info = NULL ;
307+ __cleanup_free uint8_t * hkdf_info = NULL ;
308308 char * hkdf_label ;
309309 const EVP_MD * md ;
310310 size_t hmac_len ;
@@ -373,7 +373,7 @@ static int derive_retained_key_compat(struct libnvme_global_ctx *ctx,
373373 unsigned char * retained , size_t key_len )
374374{
375375 _cleanup_evp_pkey_ctx_ EVP_PKEY_CTX * ectx = NULL ;
376- _cleanup_free_ uint8_t * hkdf_info = NULL ;
376+ __cleanup_free uint8_t * hkdf_info = NULL ;
377377 const EVP_MD * md ;
378378 size_t hmac_len ;
379379 char * pos ;
@@ -454,7 +454,7 @@ static int derive_tls_key(struct libnvme_global_ctx *ctx,
454454 unsigned char * retained , unsigned char * psk , size_t key_len )
455455{
456456 _cleanup_evp_pkey_ctx_ EVP_PKEY_CTX * ectx = NULL ;
457- _cleanup_free_ uint8_t * hkdf_info = NULL ;
457+ __cleanup_free uint8_t * hkdf_info = NULL ;
458458 char * hkdf_label ;
459459 const EVP_MD * md ;
460460 size_t hmac_len ;
@@ -531,7 +531,7 @@ static int derive_tls_key_compat(struct libnvme_global_ctx *ctx,
531531 unsigned char * retained , unsigned char * psk , size_t key_len )
532532{
533533 _cleanup_evp_pkey_ctx_ EVP_PKEY_CTX * ectx = NULL ;
534- _cleanup_free_ uint8_t * hkdf_info = NULL ;
534+ __cleanup_free uint8_t * hkdf_info = NULL ;
535535 const EVP_MD * md ;
536536 size_t hmac_len ;
537537 char * pos ;
@@ -680,7 +680,7 @@ static int derive_psk_digest(struct libnvme_global_ctx *ctx,
680680 static const char hmac_seed [] = "NVMe-over-Fabrics" ;
681681 _cleanup_ossl_lib_ctx_ OSSL_LIB_CTX * lib_ctx = NULL ;
682682 _cleanup_evp_mac_ctx_ EVP_MAC_CTX * mac_ctx = NULL ;
683- _cleanup_free_ unsigned char * psk_ctx = NULL ;
683+ __cleanup_free unsigned char * psk_ctx = NULL ;
684684 _cleanup_evp_mac_ EVP_MAC * mac = NULL ;
685685 OSSL_PARAM params [2 ], * p = params ;
686686 size_t hmac_len ;
@@ -820,7 +820,7 @@ static ssize_t getswordfish(struct libnvme_global_ctx *ctx,
820820__public int libnvme_create_raw_secret (struct libnvme_global_ctx * ctx ,
821821 const char * secret , size_t key_len , unsigned char * * raw_secret )
822822{
823- _cleanup_free_ unsigned char * buf = NULL ;
823+ __cleanup_free unsigned char * buf = NULL ;
824824 int secret_len = 0 , i , err ;
825825 unsigned int c ;
826826
@@ -904,8 +904,8 @@ static int derive_nvme_keys(struct libnvme_global_ctx *ctx,
904904 int hmac , unsigned char * configured ,
905905 unsigned char * psk , int key_len , bool compat )
906906{
907- _cleanup_free_ unsigned char * retained = NULL ;
908- _cleanup_free_ char * digest = NULL ;
907+ __cleanup_free unsigned char * retained = NULL ;
908+ __cleanup_free char * digest = NULL ;
909909 char * context = identity ;
910910 unsigned char cipher ;
911911 int ret = -1 ;
@@ -981,8 +981,8 @@ __public int libnvme_generate_tls_key_identity(struct libnvme_global_ctx *ctx,
981981 unsigned char * configured_key , int key_len ,
982982 char * * ident )
983983{
984- _cleanup_free_ unsigned char * psk = NULL ;
985- _cleanup_free_ char * identity = NULL ;
984+ __cleanup_free unsigned char * psk = NULL ;
985+ __cleanup_free char * identity = NULL ;
986986 ssize_t identity_len ;
987987 int ret ;
988988
@@ -1018,8 +1018,8 @@ __public int libnvme_generate_tls_key_identity_compat(struct libnvme_global_ctx
10181018 int version , int hmac , unsigned char * configured_key ,
10191019 int key_len , char * * ident )
10201020{
1021- _cleanup_free_ unsigned char * psk = NULL ;
1022- _cleanup_free_ char * identity = NULL ;
1021+ __cleanup_free unsigned char * psk = NULL ;
1022+ __cleanup_free char * identity = NULL ;
10231023 ssize_t identity_len ;
10241024 int ret ;
10251025
@@ -1068,7 +1068,7 @@ __public int libnvme_lookup_keyring(struct libnvme_global_ctx *ctx, const char *
10681068
10691069__public char * libnvme_describe_key_serial (struct libnvme_global_ctx * ctx , long key_id )
10701070{
1071- _cleanup_free_ char * str = NULL ;
1071+ __cleanup_free char * str = NULL ;
10721072 char * last ;
10731073
10741074 if (keyctl_describe_alloc (key_id , & str ) < 0 )
@@ -1224,8 +1224,8 @@ static int __nvme_insert_tls_key(struct libnvme_global_ctx *ctx,
12241224 int version , int hmac , unsigned char * configured_key ,
12251225 int key_len , bool compat , long * keyp )
12261226{
1227- _cleanup_free_ unsigned char * psk = NULL ;
1228- _cleanup_free_ char * identity = NULL ;
1227+ __cleanup_free unsigned char * psk = NULL ;
1228+ __cleanup_free char * identity = NULL ;
12291229 ssize_t identity_len ;
12301230 long key ;
12311231 int ret ;
@@ -1333,7 +1333,7 @@ static int __nvme_import_tls_key(struct libnvme_global_ctx *ctx, long keyring_id
13331333 const char * identity , const char * key ,
13341334 long * keyp )
13351335{
1336- _cleanup_free_ unsigned char * key_data = NULL ;
1336+ __cleanup_free unsigned char * key_data = NULL ;
13371337 unsigned char version ;
13381338 unsigned char hmac ;
13391339 size_t key_len ;
@@ -1818,7 +1818,7 @@ static int uuid_from_product_uuid(char *system_uuid)
18181818{
18191819 _cleanup_file_ FILE * stream = NULL ;
18201820 ssize_t nread ;
1821- _cleanup_free_ char * line = NULL ;
1821+ __cleanup_free char * line = NULL ;
18221822 size_t len = 0 ;
18231823
18241824 stream = fopen (PATH_DMI_PROD_UUID , "re" );
0 commit comments