From: Takashi Iwai <tiwai@suse.de>
To: Wenwen Wang <wenwen@cs.uga.edu>
Cc: "moderated list:SOUND" <alsa-devel@alsa-project.org>,
Thomas Gleixner <tglx@linutronix.de>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Allison Randal <allison@lohutok.net>,
Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>,
open list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v3] ALSA: hiface: fix multiple memory leak bugs
Date: Wed, 07 Aug 2019 12:21:27 +0200 [thread overview]
Message-ID: <s5hwofpl1i0.wl-tiwai@suse.de> (raw)
In-Reply-To: <1565168932-6337-1-git-send-email-wenwen@cs.uga.edu>
On Wed, 07 Aug 2019 11:08:51 +0200,
Wenwen Wang wrote:
>
> In hiface_pcm_init(), 'rt' is firstly allocated through kzalloc(). Later
> on, hiface_pcm_init_urb() is invoked to initialize 'rt->out_urbs[i]'. In
> hiface_pcm_init_urb(), 'rt->out_urbs[i].buffer' is allocated through
> kzalloc(). However, if hiface_pcm_init_urb() fails, both 'rt' and
> 'rt->out_urbs[i].buffer' are not deallocated, leading to memory leak bugs.
> Also, 'rt->out_urbs[i].buffer' is not deallocated if snd_pcm_new() fails.
>
> To fix the above issues, free 'rt' and 'rt->out_urbs[i].buffer'.
>
> Signed-off-by: Wenwen Wang <wenwen@cs.uga.edu>
Applied now. Thanks!
Takashi
prev parent reply other threads:[~2019-08-07 10:21 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-07 9:08 [PATCH v3] ALSA: hiface: fix multiple memory leak bugs Wenwen Wang
2019-08-07 10:21 ` Takashi Iwai [this message]
Reply instructions:
You may reply publicly 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=s5hwofpl1i0.wl-tiwai@suse.de \
--to=tiwai@suse.de \
--cc=allison@lohutok.net \
--cc=alsa-devel@alsa-project.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=perex@perex.cz \
--cc=tglx@linutronix.de \
--cc=tiwai@suse.com \
--cc=wenwen@cs.uga.edu \
/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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox