[pulseaudio-discuss] [PATCH] module-device-restore: Fix memory leak in read_sink_format_reply

David Henningsson david.henningsson at canonical.com
Wed Jan 28 12:10:55 PST 2015


This function could sometimes leak a perportentry.

Signed-off-by: David Henningsson <david.henningsson at canonical.com>
---
 src/modules/module-device-restore.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/modules/module-device-restore.c b/src/modules/module-device-restore.c
index 09ba60a..70a6517 100644
--- a/src/modules/module-device-restore.c
+++ b/src/modules/module-device-restore.c
@@ -1021,6 +1021,7 @@ static void read_sink_format_reply(struct userdata *u, pa_tagstruct *reply, pa_s
         PA_IDXSET_FOREACH(f, e->formats, idx) {
             pa_tagstruct_put_format_info(reply, f);
         }
+        perportentry_free(e);
     }
     pa_xfree(name);
 }
-- 
2.1.4



More information about the pulseaudio-discuss mailing list