diff options
author | Mike Blumenkrantz <michael.blumenkrantz@gmail.com> | 2012-12-13 14:51:00 +0000 |
---|---|---|
committer | Mike Blumenkrantz <michael.blumenkrantz@gmail.com> | 2012-12-13 14:51:00 +0000 |
commit | 8c4457aed4e88b9013d1f96bc86ba2f3d4ceb3ce (patch) | |
tree | 549a644c95a8e1fa415a5ca5aa1906f74a017faa /src/modules/mixer | |
parent | f243a81f94041fc723bb7f309f48a93f1a2fa116 (diff) | |
download | enlightenment-8c4457aed4e88b9013d1f96bc86ba2f3d4ceb3ce.tar.gz |
don't leak event infos when no cb is set for pulse events
SVN revision: 80873
Diffstat (limited to 'src/modules/mixer')
-rw-r--r-- | src/modules/mixer/serial.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/modules/mixer/serial.c b/src/modules/mixer/serial.c index 0ec7203ec6..277d06c234 100644 --- a/src/modules/mixer/serial.c +++ b/src/modules/mixer/serial.c @@ -139,10 +139,10 @@ deserialize_tag(Pulse *conn, PA_Commands command, Pulse_Tag *tag) if (!cb) return EINA_TRUE; ev = NULL; ev = deserialize_server_info(conn, tag); + if (!cb) pulse_server_info_free(ev); break; case PA_COMMAND_GET_SINK_INFO_LIST: case PA_COMMAND_GET_SOURCE_INFO_LIST: - if (!cb) return EINA_TRUE; ev = NULL; while (tag->size < tag->dsize - PA_TAG_SIZE_STRING_NULL) { @@ -155,13 +155,16 @@ deserialize_tag(Pulse *conn, PA_Commands command, Pulse_Tag *tag) pulse_sink_free(sink); break; } - ev = eina_list_append(ev, sink); + if (!cb) pulse_sink_free(sink); + else + ev = eina_list_append(ev, sink); } break; case PA_COMMAND_GET_SINK_INFO: case PA_COMMAND_GET_SOURCE_INFO: if ((!cb) && (!conn->watching)) return EINA_TRUE; ev = deserialize_sink(conn, tag, (command == PA_COMMAND_GET_SOURCE_INFO)); + if (!cb) pulse_sink_free(ev); break; case 0: deserialize_sinks_watcher(conn, tag); |