From: Lennart Poettering <mznyfn@0pointer.de>
To: ALSA Development Mailing List <alsa-devel@alsa-project.org>
Subject: Re: ALSA Leaking memory
Date: Sun, 25 Nov 2007 23:10:04 +0100 [thread overview]
Message-ID: <20071125221004.GA23860@tango.0pointer.de> (raw)
In-Reply-To: <Pine.LNX.4.61.0711252254250.7688@tm8103.perex-int.cz>
On Sun, 25.11.07 22:56, Jaroslav Kysela (perex@perex.cz) wrote:
> > ==22198== 10 bytes in 1 blocks are definitely lost in loss record 1 of 3
> > ==22198== at 0x4023765: malloc (vg_replace_malloc.c:149)
> > ==22198== by 0x417C44F: strdup (strdup.c:43)
> > ==22198== by 0x4071954: snd_determine_driver (in /usr/lib/libasound.so.2.0.0)
> > ==22198== by 0x406E80C: snd_config_hook_load_for_all_cards (in /usr/lib/libasound.so.2.0.0)
> > ==22198== by 0x406EC7C: (within /usr/lib/libasound.so.2.0.0)
> > ==22198== by 0x406F896: snd_config_searcha_hooks (in /usr/lib/libasound.so.2.0.0)
> > ==22198== by 0x406FA74: snd_config_search_alias_hooks (in /usr/lib/libasound.so.2.0.0)
> > ==22198== by 0x406FCD9: snd_config_search_definition (in /usr/lib/libasound.so.2.0.0)
> > ==22198== by 0x40952FE: (within /usr/lib/libasound.so.2.0.0)
> > ==22198== by 0x80484D7: main (in /home/lennart/alsa-test)
>
> Broken valgrind?
Unlikely.
> I cannot reproduce here and from first glance, the error
> path in snd_config_hook_load_for_all_cards is good.
I don't fully grok the code of that function
(snd_config_hook_load_for_all_cards()), but from *my* first glance I see
that snd_determine_driver() allocates the string. Immediately after
that call there are at least two "continue"s which will cause immediate
jumping to the next iteration of the loop this whole code lives in,
without ever freeing the string.
Or am I blind or missed something?
Lennart
--
Lennart Poettering Red Hat, Inc.
lennart [at] poettering [dot] net ICQ# 11060553
http://0pointer.net/lennart/ GnuPG 0x1A015CC4
next prev parent reply other threads:[~2007-11-25 22:10 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-25 21:41 ALSA Leaking memory Lennart Poettering
2007-11-25 21:56 ` Jaroslav Kysela
2007-11-25 22:10 ` Lennart Poettering [this message]
2007-11-25 22:23 ` Jaroslav Kysela
2007-11-25 22:37 ` Lennart Poettering
2007-11-26 7:17 ` Jaroslav Kysela
2007-11-26 11:30 ` 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=20071125221004.GA23860@tango.0pointer.de \
--to=mznyfn@0pointer.de \
--cc=alsa-devel@alsa-project.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
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.