Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Free pcerts array for all assign_privkey paths.
Ensure the array pcerts is free'd for both success/fail paths. The function gnutls_certificate_set_key() is odd as it takes ownership of the contents of pcerts, but not the pcerts array itself. See: gnutls-3.6.15/lib/cert-cred.c:gnutls_certificate_set_key() ... new_pcert_list = gnutls_malloc(sizeof(gnutls_pcert_st) * pcert_list_size); if (new_pcert_list == NULL) { return gnutls_assert_val(GNUTLS_E_MEMORY_ERROR); } memcpy(new_pcert_list, pcert_list, sizeof(gnutls_pcert_st) * pcert_list_size); Signed-off-by: Tom Carroll <incentivedesign@gmail.com>
- Loading branch information