Commit 43d8cfdd authored by Karl Heyes's avatar Karl Heyes
Browse files

fix bug #717. a race on source exit could cause memory corruption

svn path=/icecast/trunk/icecast/; revision=10135
parent 1cad0e2c
......@@ -85,6 +85,14 @@ void client_destroy(client_t *client)
if (client == NULL)
/* release the buffer now, as the buffer could be on the source queue
* and may of disappeared after auth completes */
if (client->refbuf)
refbuf_release (client->refbuf);
client->refbuf = NULL;
if (release_client (client))
......@@ -104,10 +112,6 @@ void client_destroy(client_t *client)
stats_event_args (NULL, "clients", "%d", global.clients);
global_unlock ();
/* drop ref counts if need be */
if (client->refbuf)
refbuf_release (client->refbuf);
/* we need to free client specific format data (if any) */
if (client->free_client_data)
client->free_client_data (client);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment