[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] core/qdev: fix memleak in qdev_get_gpio_out_connector()
From: |
Laurent Vivier |
Subject: |
Re: [PATCH] core/qdev: fix memleak in qdev_get_gpio_out_connector() |
Date: |
Mon, 9 Mar 2020 11:49:44 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1 |
Le 09/03/2020 à 11:41, Pan Nengyuan a écrit :
>
>
> On 3/9/2020 5:16 PM, Laurent Vivier wrote:
>> Le 07/03/2020 à 11:39, Marc-André Lureau a écrit :
>>> Hi
>>>
>>> On Sat, Mar 7, 2020 at 3:53 AM Pan Nengyuan <address@hidden> wrote:
>>>>
>>>> Fix a memory leak in qdev_get_gpio_out_connector().
>>>>
>>>> Reported-by: Euler Robot <address@hidden>
>>>> Signed-off-by: Pan Nengyuan <address@hidden>
>>>
>>> good catch,
>>> Reviewed-by: Marc-André Lureau <address@hidden>
>>
>> trivial question:
>>
>> Why do we prefer g_autofree() to the g_free() function?
>
> Honestly, it's no special reason in this case, just personal preference. :)
> Both of them is ok.
I asked because the function above uses a g_free() for the same purpose.
Thanks,
Laurent