qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v4 14/14] audio: fix memory leak reported by ASA


From: Zoltán Kővágó
Subject: Re: [Qemu-devel] [PATCH v4 14/14] audio: fix memory leak reported by ASAN
Date: Mon, 19 Aug 2019 04:05:04 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1

Hi,

On 2019-08-19 01:25, Philippe Mathieu-Daudé wrote:
> Hi Zoltán,
> 
> On 8/19/19 1:06 AM, Kővágó, Zoltán wrote:
>> Signed-off-by: Kővágó, Zoltán <address@hidden>
>> ---
>>  audio/audio.c | 6 ++++++
>>  1 file changed, 6 insertions(+)
>>
>> diff --git a/audio/audio.c b/audio/audio.c
>> index 924dddf2e7..9b28abca14 100644
>> --- a/audio/audio.c
>> +++ b/audio/audio.c
>> @@ -1343,6 +1343,12 @@ static void free_audio_state(AudioState *s)
>>          qapi_free_Audiodev(s->dev);
>>          s->dev = NULL;
>>      }
>> +
>> +    if (s->ts) {
>> +        timer_free(s->ts);
>> +        s->ts = NULL;
>> +    }
> 
> Why not directly fix audio_cleanup() previous to your series?

I didn't really think about it.  When I found the memory leak and
figured out it wasn't made by one of my patches, I just patched it on
top of my worktree.

> 
>> +
>>      g_free(s);
>>  }
>>  
>>

Regards,
Zoltan



reply via email to

[Prev in Thread] Current Thread [Next in Thread]