diff options
author | Dave Parks <davep@lindenlab.com> | 2012-09-12 11:46:43 -0500 |
---|---|---|
committer | Dave Parks <davep@lindenlab.com> | 2012-09-12 11:46:43 -0500 |
commit | 7b6e81ab03d361cc73c5d2f2fc88e857c7c95e13 (patch) | |
tree | 11ea2f09bc35417e038c852cb860e99339c564a0 /indra/llcommon | |
parent | 8b4d91e2f32062684b64d6dd9eb86dd89ad078f0 (diff) |
Handle the NULL case on ll_aligned_realloc_16 on linux
Diffstat (limited to 'indra/llcommon')
-rw-r--r-- | indra/llcommon/llmemory.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/indra/llcommon/llmemory.h b/indra/llcommon/llmemory.h index d4f8c152e9..e7488a03d7 100644 --- a/indra/llcommon/llmemory.h +++ b/indra/llcommon/llmemory.h @@ -81,8 +81,11 @@ inline void* ll_aligned_realloc_16(void* ptr, size_t size, size_t old_size) // r #else //FIXME: memcpy is SLOW void* ret = ll_aligned_malloc_16(size); - memcpy(ret, ptr, old_size); - ll_aligned_free_16(ptr); + if (ptr) + { + memcpy(ret, ptr, old_size); + ll_aligned_free_16(ptr); + } return ret; #endif } |