From ca6a611be4fedbd1e90e8bf755756641aba12df3 Mon Sep 17 00:00:00 2001 From: Michael Smith Date: Wed, 19 Mar 2003 07:59:32 +0000 Subject: [PATCH] Fix ordering of some calls in source shutdown, silly bug. Remove wrong comment. svn path=/trunk/icecast/; revision=4513 --- src/source.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/source.c b/src/source.c index 191783e0..e9942d94 100644 --- a/src/source.c +++ b/src/source.c @@ -159,9 +159,6 @@ int source_free_source(void *key) } -/* The caller MUST have a current write lock on global.source_tree when calling - * this - */ void *source_main(void *arg) { source_t *source = (source_t *)arg; @@ -633,11 +630,11 @@ done: if(source->dumpfile) fclose(source->dumpfile); - source_free_source(source); - /* release our hold on the lock so the main thread can continue cleaning up */ thread_rwlock_unlock(source->shutdown_rwlock); + source_free_source(source); + thread_exit(0); return NULL;