blob: 142541b93c424d70a5d66226ce4e914c5e426df2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
$NetBSD: patch-aa,v 1.4 2002/03/19 07:48:44 lukem Exp $
--- ogg123/buffer.c.orig Thu Dec 20 11:24:53 2001
+++ ogg123/buffer.c
@@ -85,12 +85,6 @@
buf_t *buf = (buf_t *)arg;
DEBUG("Enter buffer_thread_cleanup");
-
- /* Cleanup thread data structures */
- pthread_mutex_unlock(&buf->mutex);
- pthread_mutex_destroy(&buf->mutex);
- pthread_cond_destroy(&buf->playback_cond);
- pthread_cond_destroy(&buf->write_cond);
}
@@ -430,6 +424,12 @@
void buffer_destroy (buf_t *buf)
{
DEBUG("buffer_destroy");
+
+ /* Cleanup pthread variables */
+ pthread_mutex_destroy(&buf->mutex);
+ pthread_cond_destroy(&buf->write_cond);
+ pthread_cond_destroy(&buf->playback_cond);
+
free(buf);
}
|