@cryptotaxi247 / netdata-1 / commits / 849e34209

fix warning when -Wfree-nonheap-object is used (#13805)

Timotej S committed Oct 11, 2022 at 14:01 UTC 849e34209208af2ad7939f221872a49e20321883
1 file changed +2 -2
aclk/aclk_otp.c
+2 -2
@@ -380,7 +380,7 @@ int aclk_get_otp_challenge(url_t *target, const char *agent_id, unsigned char **
380 base64_decode_helper(*challenge, challenge_bytes, (const unsigned char*)challenge_base64, strlen(challenge_base64));
381 if (*challenge_bytes != CHALLENGE_LEN) {
382 error("Unexpected challenge length of %d instead of %d", *challenge_bytes, CHALLENGE_LEN);
383 - freez(challenge);
383 + freez(*challenge);
384 *challenge = NULL;
385 goto cleanup_json;
386 }
@@ -490,7 +490,7 @@ int aclk_get_mqtt_otp(EVP_PKEY *p_key, char **mqtt_id, char **mqtt_usr, char **m
490 int aclk_get_mqtt_otp(RSA *p_key, char **mqtt_id, char **mqtt_usr, char **mqtt_pass, url_t *target)
491 #endif
492 {
493 - unsigned char *challenge;
493 + unsigned char *challenge = NULL;
494 int challenge_bytes;
495
496 char *agent_id = get_agent_claimid();