Review safety of update_credentials_cb() in gtlsconnection-gnutls.c
gnutls_credentials_set(3) says:
In order to minimize memory usage, and share credentials between several threads gnutls keeps a pointer to cred, and not the whole cred structure. Thus you will have to keep the structure allocated until you call gnutls_deinit().
GTlsConnectionGnutls attempts to comply with this by storing the gnutls_certificate_credentials_t in its priv struct to keep it around for the life of the GTlsConnectionGnutls. However, update_credentials_cb() in gtlsconnection-gnutls.c improperly frees it and creates a new one. This isn't safe, and I don't know what to do about it.