[pulseaudio-discuss] [PATCH v2 05/19] modules: Fix resource leak in oss

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


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

https://scan7.coverity.com:8443/reports.htm#v10205/p10016/fileInstanceId=8824&defectInstanceId=3731&mergedDefectId=591267

Signed-off-by: Peter Meerwald <pmeerw at pmeerw.net>
---
 src/modules/oss/module-oss.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/modules/oss/module-oss.c b/src/modules/oss/module-oss.c
index 03e51c8..d661bde 100644
--- a/src/modules/oss/module-oss.c
+++ b/src/modules/oss/module-oss.c
@@ -1329,6 +1329,7 @@ int pa__init(pa_module*m) {
         if (pa_modargs_get_proplist(ma, "source_properties", source_new_data.proplist, PA_UPDATE_REPLACE) < 0) {
             pa_log("Invalid properties");
             pa_source_new_data_done(&source_new_data);
+            pa_xfree(name_buf);
             goto fail;
         }
 
@@ -1397,6 +1398,7 @@ int pa__init(pa_module*m) {
         if (pa_modargs_get_proplist(ma, "sink_properties", sink_new_data.proplist, PA_UPDATE_REPLACE) < 0) {
             pa_log("Invalid properties");
             pa_sink_new_data_done(&sink_new_data);
+            pa_xfree(name_buf);
             goto fail;
         }
 
-- 
1.7.9.5



More information about the pulseaudio-discuss mailing list