On 2015/2/28 18:13, Michael Tokarev wrote:
> 28.02.2015 13:08, arei.gong...@huawei.com пишет:
>> From: Gonglei <arei.gong...@huawei.com>
>>
>> Signed-off-by: Gonglei <arei.gong...@huawei.com>
>> ---
>> v2: fix compilation complaint. (mjt)
>> ---
>>  hw/ppc/e500.c | 2 ++
>>  1 file changed, 2 insertions(+)
>>
>> diff --git a/hw/ppc/e500.c b/hw/ppc/e500.c
>> index 7e17d18..c060b50 100644
>> --- a/hw/ppc/e500.c
>> +++ b/hw/ppc/e500.c
>> @@ -309,8 +309,10 @@ static int ppce500_load_device_tree(MachineState 
>> *machine,
>>  
>>          fdt = load_device_tree(filename, &fdt_size);
>>          if (!fdt) {
>> +            g_free(filename);
>>              goto out;
>>          }
>> +        g_free(filename);
>>          goto done;
>>      }
> 
> 
> How about this?
> 
It's ok on function, but seems oddly, isn't it?

Regards,
-Gonglei
> --- a/hw/ppc/e500.c
> +++ b/hw/ppc/e500.c
> @@ -308,6 +308,7 @@ static int ppce500_load_device_tree(MachineState *machine,
>          }
> 
>          fdt = load_device_tree(filename, &fdt_size);
> +        g_free(filename);
>          if (!fdt) {
>              goto out;
>          }
> 
> Thanks,
> 
> /mjt
> 



Reply via email to