This reverts commit
18eb55546a54e443d94a4c49286348176ad4b00a.
Due to the nature of how Error should be used (normally ownership will be
passed over to Error APIs, like error_report_err), auto-free functions may
be error prone on its own. The auto cleanup function was merged without
proper review as pointed out by Dan and Markus:
https://lore.kernel.org/r/aSWSLMi6ZhTCS_p2@redhat.com
Cc: Cédric Le Goater <clg@redhat.com>
Acked-by: Maciej S. Szmigiero <mail@maciej.szmigiero.name>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Acked-by: Maciej S. Szmigiero <maciej.szmigiero@oracle.com>
Link: https://lore.kernel.org/r/20251201194510.1121221-3-peterx@redhat.com
Signed-off-by: Peter Xu <peterx@redhat.com>
*/
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.
*/