[alsa-devel] [PATCH] alsa-plugins: fix minor memory leak

Lennart Poettering mznyfn at 0pointer.de
Thu Sep 25 21:01:55 CEST 2008


Heya!

If we fail, we need to free the device string
---
 pulse/pcm_pulse.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/pulse/pcm_pulse.c b/pulse/pcm_pulse.c
index 9a50aff..a5f794f 100644
--- a/pulse/pcm_pulse.c
+++ b/pulse/pcm_pulse.c
@@ -917,6 +917,7 @@ error:
 	if (pcm->p)
 		pulse_free(pcm->p);
 
+	free(pcm->device);
 	free(pcm);
 
 	return err;
-- 
1.6.0.1



Lennart

-- 
Lennart Poettering                        Red Hat, Inc.
lennart [at] poettering [dot] net         ICQ# 11060553
http://0pointer.net/lennart/           GnuPG 0x1A015CC4


More information about the Alsa-devel mailing list