diff options
-rw-r--r-- | toxav/toxav.c | 5 | ||||
-rw-r--r-- | toxcore/util.c | 8 |
2 files changed, 6 insertions, 7 deletions
diff --git a/toxav/toxav.c b/toxav/toxav.c index 4d9d668d..8101cbdb 100644 --- a/toxav/toxav.c +++ b/toxav/toxav.c | |||
@@ -372,11 +372,6 @@ static int toxav_send_rtp_payload(ToxAv *av, | |||
372 | const uint8_t *payload, | 372 | const uint8_t *payload, |
373 | unsigned int length) | 373 | unsigned int length) |
374 | { | 374 | { |
375 | if (length > MAX_CRYPTO_DATA_SIZE) { | ||
376 | LOGGER_WARNING("Size exceeds limit: %d", length); | ||
377 | return av_ErrorUnknown; | ||
378 | } | ||
379 | |||
380 | if (call->crtps[type - av_TypeAudio]) { | 375 | if (call->crtps[type - av_TypeAudio]) { |
381 | 376 | ||
382 | /* Audio */ | 377 | /* Audio */ |
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 | ||