1
0
mirror of https://gitlab.xiph.org/xiph/icecast-server.git synced 2024-12-04 14:46:30 -05:00

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

svn path=/icecast/trunk/icecast/; revision=10135
This commit is contained in:
Karl Heyes 2005-10-06 02:41:51 +00:00
parent 1cad0e2c07
commit 43d8cfdd73

View File

@ -85,6 +85,14 @@ void client_destroy(client_t *client)
if (client == NULL)
return;
/* 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))
return;
@ -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);