On Fri, Sep 30, 2022 at 05:27:00PM +0100, Richard W.M. Jones wrote:
> On Fri, Sep 30, 2022 at 10:42:01AM -0500, Eric Blake wrote:
> > Modern GCC has two related attributes for functions returning a
> > pointer:
> >
> > __attribute__((__malloc__)) - this function returns a new pointer, not
> >
On Fri, Sep 30, 2022 at 10:42:01AM -0500, Eric Blake wrote:
> Modern GCC has two related attributes for functions returning a
> pointer:
>
> __attribute__((__malloc__)) - this function returns a new pointer, not
> aliased to any existing pointer
>
> __attribute__((__malloc__(fn,1))) - call
Modern GCC has two related attributes for functions returning a
pointer:
__attribute__((__malloc__)) - this function returns a new pointer, not
aliased to any existing pointer
__attribute__((__malloc__(fn,1))) - call fn(return_value) to avoid
leaking memory allocated by this function
With those