[pulseaudio-discuss] [PATCH v2 01/19] modules: Fix resource leak in stream-restore

Peter Meerwald pmeerw at pmeerw.net
Thu Dec 19 03:11:30 PST 2013


From: Peter Meerwald <p.meerwald at bct-electronic.com>

https://scan7.coverity.com:8443/reports.htm#v10205/p10016/fileInstanceId=8726&defectInstanceId=3724&mergedDefectId=591260

Signed-off-by: Peter Meerwald <pmeerw at pmeerw.net>
---
 src/modules/module-stream-restore.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/modules/module-stream-restore.c b/src/modules/module-stream-restore.c
index 7eb79ab..9689e79 100644
--- a/src/modules/module-stream-restore.c
+++ b/src/modules/module-stream-restore.c
@@ -2119,8 +2119,10 @@ static int extension_cb(pa_native_protocol *p, pa_module *m, pa_native_connectio
                     pa_tagstruct_get_channel_map(t, &entry->channel_map) ||
                     pa_tagstruct_get_cvolume(t, &entry->volume) < 0 ||
                     pa_tagstruct_gets(t, &device) < 0 ||
-                    pa_tagstruct_get_boolean(t, &muted) < 0)
+                    pa_tagstruct_get_boolean(t, &muted) < 0) {
+                    entry_free(entry);
                     goto fail;
+                }
 
                 if (!name || !*name) {
                     entry_free(entry);
-- 
1.7.9.5



More information about the pulseaudio-discuss mailing list