Re: [Qemu-devel] [PATCH] xics: fix several error leaks

2017-09-11 Thread David Gibson
On Tue, Sep 12, 2017 at 12:04:40AM +0200, Greg Kurz wrote: > If object_property_get_link() fails then it allocates an error, which > must be freed before returning. The error_get_pretty() function is > merely an accessor to the error message and doesn't free anything. > > The error.h header indica

[Qemu-devel] [PATCH] xics: fix several error leaks

2017-09-11 Thread Greg Kurz
If object_property_get_link() fails then it allocates an error, which must be freed before returning. The error_get_pretty() function is merely an accessor to the error message and doesn't free anything. The error.h header indicates how to do it right: * Pass an existing error to the caller with