From: Takashi Iwai <tiwai@suse.de>
To: Lee Revell <rlrevell@joe-job.com>
Cc: alsa-devel <alsa-devel@lists.sourceforge.net>
Subject: Re: memory leaks?
Date: Wed, 30 Mar 2005 14:08:05 +0200 [thread overview]
Message-ID: <s5hhditgwuy.wl@alsa2.suse.de> (raw)
In-Reply-To: <1112131916.5386.6.camel@mindpipe>
[-- Attachment #1: Type: text/plain, Size: 802 bytes --]
At Tue, 29 Mar 2005 16:31:56 -0500,
Lee Revell wrote:
>
> On Tue, 2005-03-29 at 15:24 -0500, Lee Revell wrote:
> > On Tue, 2005-03-29 at 14:27 +0200, Takashi Iwai wrote:
> > > Yes. Could you trace the corresponding addresses?
> > > (just checking /proc/kallsyms before unloading would help, too).
> >
> > How exactly would I trace those addresses?
> >
> > Anyway, it looks to me that the leak is in snd_seq_midi. Here is the
> > most recent output. The first one I'm not sure about, the second seems
> > to be in snd_seq_midisynth_register_port.
>
> I might have found it. The info structure allocated in
> snd_seq_midisynth_register_port does not seem to be freed in
> snd_seq_midisynth_unregister_port, except on the error paths.
Nice catch. Does the patch below fix the problem?
Takashi
[-- Attachment #2: Type: text/plain, Size: 506 bytes --]
Index: alsa-kernel/core/seq/seq_midi.c
===================================================================
RCS file: /home/iwai/cvs/alsa/alsa-kernel/core/seq/seq_midi.c,v
retrieving revision 1.26
diff -u -r1.26 seq_midi.c
--- alsa-kernel/core/seq/seq_midi.c 22 Mar 2005 15:21:18 -0000 1.26
+++ alsa-kernel/core/seq/seq_midi.c 30 Mar 2005 12:07:12 -0000
@@ -414,6 +414,7 @@
if (newclient)
synths[card->number] = client;
up(®ister_mutex);
+ kfree(info);
return 0; /* success */
__nomem:
next prev parent reply other threads:[~2005-03-30 12:08 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-03-27 4:14 memory leaks? Lee Revell
2005-03-29 12:27 ` Takashi Iwai
2005-03-29 20:24 ` Lee Revell
2005-03-29 21:31 ` Lee Revell
2005-03-30 12:08 ` Takashi Iwai [this message]
2005-03-30 12:18 ` Takashi Iwai
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=s5hhditgwuy.wl@alsa2.suse.de \
--to=tiwai@suse.de \
--cc=alsa-devel@lists.sourceforge.net \
--cc=rlrevell@joe-job.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.