diff options
Diffstat (limited to 'mysys/my_alloc.c')
-rw-r--r-- | mysys/my_alloc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mysys/my_alloc.c b/mysys/my_alloc.c index 0263283221b..a7d4ec1c248 100644 --- a/mysys/my_alloc.c +++ b/mysys/my_alloc.c @@ -491,7 +491,7 @@ char *strmake_root(MEM_ROOT *root, const char *str, size_t len) void *memdup_root(MEM_ROOT *root, const void *str, size_t len) { char *pos; - if ((pos=alloc_root(root,len))) + if ((pos=alloc_root(root,len)) && len) memcpy(pos,str,len); return pos; } |