Peter Xu <[email protected]> writes:

> There're only two use cases of g_autoptr to free Error objects in migration
> code paths.
>
> 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 accidentally
> merged as pointed out by Dan and Markus:
>
> https://lore.kernel.org/r/[email protected]

Perhaps "merged without proper review" would be more accurate.

> Remove the two use cases so that we can remove the auto cleanup function,
> hence suggest to not use auto frees for Errors.
>
> Suggested-by: Markus Armbruster <[email protected]>
> Signed-off-by: Peter Xu <[email protected]>

Reviewed-by: Markus Armbruster <[email protected]>


Reply via email to