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 08:13:41 +0100	[thread overview]
Message-ID: <s5hmy349j2y.wl%tiwai@suse.de> (raw)
In-Reply-To: <1257185541.1937.17.camel@dark-knight>

At Mon, 02 Nov 2009 13:12:21 -0500,
John Lindgren wrote:
> 
> On Mon, 2009-11-02 at 07:21 +0100, Jaroslav Kysela wrote:
> > On Sun, 1 Nov 2009, John Lindgren wrote:
> > 
> > > * Remove erroneous snd_config_delete calls that cause later calls to
> > > snd_pcm_open to fail.
> > 
> > It does not look good. Have you checked with valgrind if there are no 
> > memory leaks?
> 
> You're making the same mistake that the original author of the code
> made.  snd_config_delete is not a call to free memory; it is a call to
> remove sections of the loaded configuration.  The configuration nodes
> that were being passed to snd_config_delete were returned by
> snd_config_search, which returns direct pointers to the actual nodes in
> the configuration.  It does no memory duplication.

Well, no, the code there should be OK.  It's the place to replace the
whole sub-tree by overriding the object.  Thus, freeing the object
returned from snd_config_search() is correct.

The problem is rather in namehint.c, as found in my patch in another
post.

> > Please, split your changes to single patches. Thanks.
> 
> I will do so when I have the time to learn Git a little better.  (I
> normally use Mercurial).

This is easy even without VCS.  Just split your own patch to several
files by an editor :)   Namely, the change of dlmisc.c, and the
addition of "ctl" check in namehint.c.


thanks,

Takashi

  reply	other threads:[~2009-11-03  7:13 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 [this message]
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
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=s5hmy349j2y.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.