From 954234f0a477636eab751a6601d34bab1db41b0e Mon Sep 17 00:00:00 2001 From: "Dmitry V. Levin" Date: Thu, 14 Dec 2023 08:00:00 +0000 Subject: treewide: assume free(NULL) is no-op The C standard guarantees that if the argument of free() is a null pointer, no action occurs. --- modules/pam_timestamp/hmac_openssl_wrapper.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'modules/pam_timestamp') diff --git a/modules/pam_timestamp/hmac_openssl_wrapper.c b/modules/pam_timestamp/hmac_openssl_wrapper.c index ac434377..a59a8de2 100644 --- a/modules/pam_timestamp/hmac_openssl_wrapper.c +++ b/modules/pam_timestamp/hmac_openssl_wrapper.c @@ -297,9 +297,7 @@ hmac_management(pam_handle_t *pamh, int debug, void **out, size_t *out_length, ret = PAM_SUCCESS; done: - if (hmac_message != NULL) { - free(hmac_message); - } + free(hmac_message); if (key != NULL) { pam_overwrite_n(key, key_length); free(key); -- cgit v1.2.3