tidy-up: use curlx_safefree()

Closes #21700
This commit is contained in:
Viktor Szakats 2026-05-20 20:43:59 +02:00
parent d3b04e5600
commit bcd0497c81
No known key found for this signature in database
19 changed files with 41 additions and 80 deletions

View file

@ -238,10 +238,8 @@ CURLcode Curl_vtls_apple_verify(struct Curl_cfilter *cf,
err_desc = curlx_malloc(size + 1);
if(err_desc) {
if(!CFStringGetCString(error_ref, err_desc, size,
kCFStringEncodingUTF8)) {
curlx_free(err_desc);
err_desc = NULL;
}
kCFStringEncodingUTF8))
curlx_safefree(err_desc);
}
}
infof(data, "Apple SecTrust failure %ld%s%s", code,

View file

@ -632,8 +632,7 @@ void Curl_ssl_free_certinfo(struct Curl_easy *data)
ci->certinfo[i] = NULL;
}
curlx_free(ci->certinfo); /* free the actual array too */
ci->certinfo = NULL;
curlx_safefree(ci->certinfo); /* free the actual array too */
ci->num_of_certs = 0;
}
}