diff options
author | Max Kellermann <max@duempel.org> | 2011-08-30 22:19:52 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2011-08-30 22:20:32 +0200 |
commit | 34d9d8abd4b45dd3236a5ffcabe5545d471cc6a0 (patch) | |
tree | 0ea6d772c37230b1756e3d09ffd9d5cb022e05e4 /src/output | |
parent | bd67e986f4706a9eb395e103438c94d58634f7a8 (diff) | |
download | mpd-34d9d8abd4b45dd3236a5ffcabe5545d471cc6a0.tar.gz mpd-34d9d8abd4b45dd3236a5ffcabe5545d471cc6a0.tar.xz mpd-34d9d8abd4b45dd3236a5ffcabe5545d471cc6a0.zip |
output/raop: merge raopcl_close() into _finish()
.. and fix a double free bug.
Diffstat (limited to 'src/output')
-rw-r--r-- | src/output/raop_output_plugin.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/src/output/raop_output_plugin.c b/src/output/raop_output_plugin.c index 3b5e319c4..24cc96e4d 100644 --- a/src/output/raop_output_plugin.c +++ b/src/output/raop_output_plugin.c @@ -562,15 +562,6 @@ raopcl_connect(struct raop_data *rd, GError **error_r) return rval; } -static void -raopcl_close(struct raop_data *rd) -{ - if (rd->rtspcl) - rtspcl_close(rd->rtspcl); - rd->rtspcl = NULL; - g_free(rd); -} - static int difference (struct timeval *t1, struct timeval *t2) { @@ -666,7 +657,10 @@ static void raop_output_finish(void *data) { struct raop_data *rd = data; - raopcl_close(rd); + + if (rd->rtspcl) + rtspcl_close(rd->rtspcl); + g_mutex_free(rd->control_mutex); g_free(rd); } |