QEMU-Devel Archive on lore.kernel.org
 help / color / Atom feed
From: "Philippe Mathieu-Daudé" <philmd@redhat.com>
To: "Zoltán Kővágó" <dirty.ice.hu@gmail.com>, qemu-devel@nongnu.org
Cc: Gerd Hoffmann <kraxel@redhat.com>
Subject: Re: [Qemu-devel] [PATCH v4 14/14] audio: fix memory leak reported by ASAN
Date: Mon, 19 Aug 2019 13:21:41 +0200
Message-ID: <6a17304f-d9c2-0b98-e641-598e141107d1@redhat.com> (raw)
In-Reply-To: <5b788626-f2bd-68a2-5825-2ad5b96ff221@gmail.com>

On 8/19/19 4:05 AM, Zoltán Kővágó wrote:
> 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 <DirtY.iCE.hu@gmail.com>
>>> ---
>>>  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.

I see. QEMU does 'stable' releases from time to time. These releases
contain security/bug fixes, and no new features. Sometimes important
memory leaks are fixed in stable release.
If this patch is at the beginning of your series, it might be selected
for stable release. If it is after you introduced your feature it won't.

If you have to respin your series, consider reordering this fix for
stable inclusion.

Meanwhile,
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>

>>
>>> +
>>>      g_free(s);
>>>  }
>>>  
>>>
> 
> Regards,
> Zoltan
> 


  reply index

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-18 23:06 [Qemu-devel] [PATCH v4 00/14] Multiple simultaneous audio backends Kővágó, Zoltán
2019-08-18 23:06 ` [Qemu-devel] [PATCH v4 01/14] audio: reduce glob_audio_state usage Kővágó, Zoltán
2019-08-18 23:06 ` [Qemu-devel] [PATCH v4 02/14] audio: basic support for multi backend audio Kővágó, Zoltán
2019-08-18 23:06 ` [Qemu-devel] [PATCH v4 03/14] audio: add audiodev property to vnc and wav_capture Kővágó, Zoltán
2019-08-18 23:06 ` [Qemu-devel] [PATCH v4 04/14] audio: add audiodev properties to frontends Kővágó, Zoltán
2019-08-18 23:06 ` [Qemu-devel] [PATCH v4 05/14] paaudio: prepare for multiple audiodev Kővágó, Zoltán
2019-08-18 23:06 ` [Qemu-devel] [PATCH v4 06/14] audio: audiodev= parameters no longer optional when -audiodev present Kővágó, Zoltán
2019-08-18 23:06 ` [Qemu-devel] [PATCH v4 07/14] paaudio: do not move stream when sink/source name is specified Kővágó, Zoltán
2019-08-18 23:06 ` [Qemu-devel] [PATCH v4 08/14] paaudio: properly disconnect streams in fini_* Kővágó, Zoltán
2019-08-18 23:06 ` [Qemu-devel] [PATCH v4 09/14] audio: remove audio_MIN, audio_MAX Kővágó, Zoltán
2019-08-18 23:06 ` [Qemu-devel] [PATCH v4 10/14] audio: do not run each backend in audio_run Kővágó, Zoltán
2019-08-18 23:06 ` [Qemu-devel] [PATCH v4 11/14] paaudio: fix playback glitches Kővágó, Zoltán
2019-08-18 23:06 ` [Qemu-devel] [PATCH v4 12/14] audio: remove read and write pcm_ops Kővágó, Zoltán
2019-08-18 23:06 ` [Qemu-devel] [PATCH v4 13/14] audio: use size_t where makes sense Kővágó, Zoltán
2019-08-18 23:06 ` [Qemu-devel] [PATCH v4 14/14] audio: fix memory leak reported by ASAN Kővágó, Zoltán
2019-08-18 23:25   ` Philippe Mathieu-Daudé
2019-08-19  2:05     ` Zoltán Kővágó
2019-08-19 11:21       ` Philippe Mathieu-Daudé [this message]
2019-08-18 23:35 ` [Qemu-devel] [PATCH v4 00/14] Multiple simultaneous audio backends no-reply

Reply instructions:

You may reply publically to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6a17304f-d9c2-0b98-e641-598e141107d1@redhat.com \
    --to=philmd@redhat.com \
    --cc=dirty.ice.hu@gmail.com \
    --cc=kraxel@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

QEMU-Devel Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/qemu-devel/0 qemu-devel/git/0.git
	git clone --mirror https://lore.kernel.org/qemu-devel/1 qemu-devel/git/1.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 qemu-devel qemu-devel/ https://lore.kernel.org/qemu-devel \
		qemu-devel@nongnu.org qemu-devel@archiver.kernel.org
	public-inbox-index qemu-devel

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.nongnu.qemu-devel


AGPL code for this site: git clone https://public-inbox.org/ public-inbox