All of lore.kernel.org
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: John Lindgren <john.lindgren@tds.net>
Cc: alsa-devel@alsa-project.org
Subject: Re: [PATCH] alsa-lib: snd_device_name_hint misbehaving
Date: Tue, 03 Nov 2009 09:03:59 +0100	[thread overview]
Message-ID: <s5hhbtc9gr4.wl%tiwai@suse.de> (raw)
In-Reply-To: <s5hocnk9j9t.wl%tiwai@suse.de>

At Tue, 03 Nov 2009 08:09:34 +0100,
I wrote:
> 
> At Mon, 02 Nov 2009 12:58:20 -0500,
> John Lindgren wrote:
> > 
> > On Mon, 2009-11-02 at 15:55 +0100, Takashi Iwai wrote:
> > > Thanks.  I guess this depends on the config files.
> > > Could you attach your ones?
> > 
> > I can reproduce with only the stock /usr/share/alsa/alsa.conf from
> > Debian installed if I try to use the "null" device after
> > snd_device_name_hint.  /usr/share/alsa/alsa.conf is attached.
> 
> Thanks!  I could reproduce the problem on my machine, too.
> 
> Now I think I found the culprit.  This is not in the core conf.c code,
> but it's in namehint.c.  Try the patch below.
> 
> The point is that the variable "res" can be two different instances
> in try_config().  One is the result of snd_config_search_definition().
> In this case, res is the copied (expanded) objects.
> 
> This one is freed in the middle of try_config(), and then res is
> assigned again to another one by snd_config_search_alias_hooks().
> This guy is no expanded object but a reference.
> 
> However, the original code calls snd_config_free(res) no matter which
> object is.  So, freeing the latter one results in the breakage of the
> config tree.
> 
> The patch adds the check of the object type to be freed or not.

Since no problem is found with valgrind, I applied the patch to git tree
now.


thanks,

Takashi

  reply	other threads:[~2009-11-03  8:03 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-02  2:23 [PATCH] alsa-lib: snd_device_name_hint misbehaving John Lindgren
2009-11-02  6:21 ` Jaroslav Kysela
2009-11-02 18:12   ` John Lindgren
2009-11-03  7:13     ` Takashi Iwai
2009-11-02  6:49 ` Raymond Yau
2009-11-02 13:08 ` Takashi Iwai
2009-11-02 14:43   ` John Lindgren
2009-11-02 14:55     ` Takashi Iwai
2009-11-02 17:58       ` John Lindgren
2009-11-03  7:09         ` Takashi Iwai
2009-11-03  8:03           ` Takashi Iwai [this message]
2009-11-03 15:28             ` John Lindgren
2009-11-03 15:48               ` Jaroslav Kysela
2009-11-02 18:23 John Lindgren

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=s5hhbtc9gr4.wl%tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=john.lindgren@tds.net \
    /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.