Re: Small memory leak in snd_pcm_ladspa_init()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



n Wed, 21 Jul 2010, John Lindgren wrote:

> Hello,
>
> Valgrind shows up a small memory leak in libasound when using a LADSPA
> plugin.  Sorry, I don't have a patch this time.

Does this patch help?

diff --git a/src/pcm/pcm_ladspa.c b/src/pcm/pcm_ladspa.c
index 5161820..c413c10 100644
--- a/src/pcm/pcm_ladspa.c
+++ b/src/pcm/pcm_ladspa.c
@@ -341,6 +341,8 @@ static void snd_pcm_ladspa_free_instances(snd_pcm_t *pcm, snd_pcm_ladspa_t *lads
  						free(instance->output.m_data[idx]);
  					free(instance->output.m_data);
                                  }
+                                free(instance->input.data);
+                                free(instance->output.data);
  				list_del(&(instance->list));
  				snd_pcm_ladspa_free_eps(&instance->input);
  				snd_pcm_ladspa_free_eps(&instance->output);

-----
Jaroslav Kysela <perex@xxxxxxxx>
Linux Kernel Sound Maintainer
ALSA Project, Red Hat, Inc.

_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel


[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux