diff options
author | irungentoo <irungentoo@gmail.com> | 2014-11-29 16:09:50 -0500 |
---|---|---|
committer | irungentoo <irungentoo@gmail.com> | 2014-11-29 16:09:50 -0500 |
commit | e254c4fe3e7431a22614851156648e9ae8ff9577 (patch) | |
tree | 9319a853797f63fc9dafd85e05c5bfed527fb2cc /toxcore/util.c | |
parent | 8deb032b2d9a77465a3c2b65a409787098e387cd (diff) |
Fixed bug where video didn't work anymore.
Some other cleanups.
Diffstat (limited to 'toxcore/util.c')
-rw-r--r-- | toxcore/util.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/toxcore/util.c b/toxcore/util.c index 93e63ac2..5a72c4a4 100644 --- a/toxcore/util.c +++ b/toxcore/util.c | |||
@@ -170,12 +170,16 @@ int create_recursive_mutex(pthread_mutex_t *mutex) | |||
170 | if (pthread_mutexattr_init(&attr) != 0) | 170 | if (pthread_mutexattr_init(&attr) != 0) |
171 | return -1; | 171 | return -1; |
172 | 172 | ||
173 | if (pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE) != 0) | 173 | if (pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE) != 0) { |
174 | pthread_mutexattr_destroy(&attr); | ||
174 | return -1; | 175 | return -1; |
176 | } | ||
175 | 177 | ||
176 | /* Create queue mutex */ | 178 | /* Create queue mutex */ |
177 | if (pthread_mutex_init(mutex, &attr) != 0) | 179 | if (pthread_mutex_init(mutex, &attr) != 0) { |
180 | pthread_mutexattr_destroy(&attr); | ||
178 | return -1; | 181 | return -1; |
182 | } | ||
179 | 183 | ||
180 | pthread_mutexattr_destroy(&attr); | 184 | pthread_mutexattr_destroy(&attr); |
181 | 185 | ||