[xiph-commits] r10135 - icecast/trunk/icecast/src
karl at svn.xiph.org
karl at svn.xiph.org
Wed Oct 5 19:41:53 PDT 2005
Author: karl
Date: 2005-10-05 19:41:51 -0700 (Wed, 05 Oct 2005)
New Revision: 10135
Modified:
icecast/trunk/icecast/src/client.c
Log:
fix bug #717. a race on source exit could cause memory corruption
Modified: icecast/trunk/icecast/src/client.c
===================================================================
--- icecast/trunk/icecast/src/client.c 2005-10-06 01:20:02 UTC (rev 10134)
+++ icecast/trunk/icecast/src/client.c 2005-10-06 02:41:51 UTC (rev 10135)
@@ -85,6 +85,14 @@
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 @@
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);
More information about the commits
mailing list