]> code.delx.au - pulseaudio/commitdiff
ladspa: Fix a couple of minor memory leaks.
authorTanu Kaskinen <tanuk@iki.fi>
Sun, 27 Jan 2013 02:51:55 +0000 (04:51 +0200)
committerTanu Kaskinen <tanuk@iki.fi>
Sun, 27 Jan 2013 02:51:55 +0000 (04:51 +0200)
src/modules/module-ladspa-sink.c

index 05fb215ee0f9392e74cef0a4f53f53626e0bdd60..e18e674e5df6147b2023cba55e1f41155affa399 100644 (file)
@@ -1132,10 +1132,10 @@ int pa__init(pa_module*m) {
         while ((pname = pa_split(input_ladspaport_map, ",", &state))) {
             if (c == u->input_count) {
                 pa_log("Too many ports in input ladspa port map");
+                pa_xfree(pname);
                 goto fail;
             }
 
-
             for (p = 0; p < d->PortCount; p++) {
                 if (pa_streq(d->PortNames[p], pname)) {
                     if (LADSPA_IS_PORT_AUDIO(d->PortDescriptors[p]) && LADSPA_IS_PORT_INPUT(d->PortDescriptors[p])) {
@@ -1160,6 +1160,7 @@ int pa__init(pa_module*m) {
         while ((pname = pa_split(output_ladspaport_map, ",", &state))) {
             if (c == u->output_count) {
                 pa_log("Too many ports in output ladspa port map");
+                pa_xfree(pname);
                 goto fail;
             }
             for (p = 0; p < d->PortCount; p++) {