crypto: define cleanup functions for use with g_autoptr
commit133cf1e5b1a9a3cc6f1e47e5edad67d000259dd6
authorDaniel P. Berrangé <berrange@redhat.com>
Tue, 23 Jul 2019 14:29:40 +0000 (23 15:29 +0100)
committerDaniel P. Berrangé <berrange@redhat.com>
Thu, 22 Aug 2019 09:47:12 +0000 (22 10:47 +0100)
tree74c690191bb11a19e2a32a2440bf0af4f9d44d75
parent00f2cfbbec63fb6f5a7789797a62ccedd22466ea
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>
include/crypto/block.h
include/crypto/cipher.h
include/crypto/hmac.h
include/crypto/ivgen.h
include/crypto/tlssession.h