aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCarsten Haitzler <raster@rasterman.com>2013-01-24 06:31:08 +0000
committerCarsten Haitzler <raster@rasterman.com>2013-01-24 06:31:08 +0000
commita7049f3c0f9e2058f41519f03f7a7da8fc1bd29f (patch)
tree301f5658c6fca03ad91f59dc112590aec7255f3f
parentaf0a1820c98be373cf6a52e4faced8b544a2866b (diff)
downloadenlightenment-a7049f3c0f9e2058f41519f03f7a7da8fc1bd29f.tar.gz
enlightenment-a7049f3c0f9e2058f41519f03f7a7da8fc1bd29f.tar.xz
enlightenment-a7049f3c0f9e2058f41519f03f7a7da8fc1bd29f.zip
how about we dont make pulse stop working? yes - the unlikely leak
fix.. made it stop :( SVN revision: 83201
-rw-r--r--src/modules/mixer/serial.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/modules/mixer/serial.c b/src/modules/mixer/serial.c
index 2a6487f66..ed3fc63bd 100644
--- a/src/modules/mixer/serial.c
+++ b/src/modules/mixer/serial.c
@@ -63,6 +63,7 @@ deserialize_sink(Pulse *conn __UNUSED__, Pulse_Tag *tag, Eina_Bool source)
const char *monitor_source_name, *driver;
Eina_Hash *props = NULL;
unsigned int x;
+ Pulse_Sink_Port_Info *pi = NULL;
monitor_source_name = driver = NULL;
EINA_SAFETY_ON_FALSE_GOTO(untag_uint32(tag, &x), error);
@@ -98,13 +99,12 @@ deserialize_sink(Pulse *conn __UNUSED__, Pulse_Tag *tag, Eina_Bool source)
for (x = 0; x < n_ports; x++)
{
- Pulse_Sink_Port_Info *pi;
-
pi = calloc(1, sizeof(Pulse_Sink_Port_Info));
- sink->ports = eina_list_append(sink->ports, pi);
EINA_SAFETY_ON_FALSE_GOTO(untag_string(tag, &pi->name), error);
EINA_SAFETY_ON_FALSE_GOTO(untag_string(tag, &pi->description), error);
EINA_SAFETY_ON_FALSE_GOTO(untag_uint32(tag, &pi->priority), error);
+ sink->ports = eina_list_append(sink->ports, pi);
+ pi = NULL;
}
EINA_SAFETY_ON_FALSE_GOTO(untag_string(tag, &sink->active_port), error);
if (exist)
@@ -119,6 +119,13 @@ deserialize_sink(Pulse *conn __UNUSED__, Pulse_Tag *tag, Eina_Bool source)
}
return sink;
error:
+ if (pi)
+ {
+ if (pi->name) eina_stringshare_del(pi->name);
+ if (pi->description) eina_stringshare_del(pi->description);
+ free(pi);
+ pi = NULL;
+ }
pulse_sink_free(sink);
eina_hash_free(props);
return NULL;