diff options
author | Timotej S <6674623+underhood@users.noreply.github.com> | 2022-10-11 14:01:04 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-11 14:01:04 +0200 |
commit | 849e34209208af2ad7939f221872a49e20321883 (patch) | |
tree | 64122cb7427e31d61e00cb50ced2f70c67d9f243 | |
parent | b796f3abb78905e6c9e8b2e71b8d0b2cd61cafe3 (diff) |
fix warning when -Wfree-nonheap-object is used (#13805)
-rw-r--r-- | aclk/aclk_otp.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/aclk/aclk_otp.c b/aclk/aclk_otp.c index af92ade931..2bdbb70fb1 100644 --- a/aclk/aclk_otp.c +++ b/aclk/aclk_otp.c @@ -380,7 +380,7 @@ int aclk_get_otp_challenge(url_t *target, const char *agent_id, unsigned char ** base64_decode_helper(*challenge, challenge_bytes, (const unsigned char*)challenge_base64, strlen(challenge_base64)); if (*challenge_bytes != CHALLENGE_LEN) { error("Unexpected challenge length of %d instead of %d", *challenge_bytes, CHALLENGE_LEN); - freez(challenge); + freez(*challenge); *challenge = NULL; goto cleanup_json; } @@ -490,7 +490,7 @@ int aclk_get_mqtt_otp(EVP_PKEY *p_key, char **mqtt_id, char **mqtt_usr, char **m int aclk_get_mqtt_otp(RSA *p_key, char **mqtt_id, char **mqtt_usr, char **mqtt_pass, url_t *target) #endif { - unsigned char *challenge; + unsigned char *challenge = NULL; int challenge_bytes; char *agent_id = get_agent_claimid(); |