mirror of
https://github.com/coturn/coturn.git
synced 2025-10-29 05:51:10 +01:00
fixes
This commit is contained in:
parent
7ce481bcf8
commit
0204f7b0fe
@ -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;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user