output/raop: merge raopcl_close() into _finish()
.. and fix a double free bug.
This commit is contained in:
@@ -562,15 +562,6 @@ raopcl_connect(struct raop_data *rd, GError **error_r)
|
|||||||
return rval;
|
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
|
static int
|
||||||
difference (struct timeval *t1, struct timeval *t2)
|
difference (struct timeval *t1, struct timeval *t2)
|
||||||
{
|
{
|
||||||
@@ -666,7 +657,10 @@ static void
|
|||||||
raop_output_finish(void *data)
|
raop_output_finish(void *data)
|
||||||
{
|
{
|
||||||
struct raop_data *rd = data;
|
struct raop_data *rd = data;
|
||||||
raopcl_close(rd);
|
|
||||||
|
if (rd->rtspcl)
|
||||||
|
rtspcl_close(rd->rtspcl);
|
||||||
|
|
||||||
g_mutex_free(rd->control_mutex);
|
g_mutex_free(rd->control_mutex);
|
||||||
g_free(rd);
|
g_free(rd);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user