From: "Maciej S. Szmigiero" <maciej.szmigi...@oracle.com> Used by the hv-balloon driver for automatic memory management.
Signed-off-by: Maciej S. Szmigiero <maciej.szmigi...@oracle.com> --- include/qapi/error.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/qapi/error.h b/include/qapi/error.h index f21a231bb1..b0b1838e3e 100644 --- a/include/qapi/error.h +++ b/include/qapi/error.h @@ -437,6 +437,8 @@ Error *error_copy(const Error *err); */ void error_free(Error *err); +G_DEFINE_AUTOPTR_CLEANUP_FUNC(Error, error_free) + /* * Convenience function to assert that *@errp is set, then silently free it. */