1
0
mirror of https://github.com/coturn/coturn.git synced 2025-10-29 05:51:10 +01:00
This commit is contained in:
mom040267 2014-10-05 23:55:42 +00:00
parent 7ce481bcf8
commit 0204f7b0fe

View File

@ -3642,8 +3642,11 @@ void* allocate_super_memory_region_func(super_memory_t *r, size_t size, const ch
UNUSED_ARG(func);
UNUSED_ARG(line);
if(!r)
return malloc(size);
if(!r) {
void *ret = malloc(size);
ns_bzero(ret, size);
return ret;
}
void *ret = NULL;
@ -3697,8 +3700,10 @@ void* allocate_super_memory_region_func(super_memory_t *r, size_t size, const ch
pthread_mutex_unlock(&r->mutex_sm);
if(!ret)
if(!ret) {
ret = malloc(size);
ns_bzero(ret, size);
}
return ret;
}