mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 23:33:54 -06:00
crypto: define cleanup functions for use with g_autoptr
Allow crypto structs to be used with g_autoptr, avoiding the need to explicitly call XXX_free() functions when variables go out of scope on the stack. Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
parent
00f2cfbbec
commit
133cf1e5b1
5 changed files with 10 additions and 0 deletions
|
@ -160,6 +160,8 @@ QCryptoTLSSession *qcrypto_tls_session_new(QCryptoTLSCreds *creds,
|
|||
*/
|
||||
void qcrypto_tls_session_free(QCryptoTLSSession *sess);
|
||||
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(QCryptoTLSSession, qcrypto_tls_session_free)
|
||||
|
||||
/**
|
||||
* qcrypto_tls_session_check_credentials:
|
||||
* @sess: the TLS session object
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue