diff options
author | Steve Bennett <steveb@workware.net.au> | 2011-12-01 00:55:00 +1000 |
---|---|---|
committer | Steve Bennett <steveb@workware.net.au> | 2011-12-02 21:00:03 +1000 |
commit | 3542b58ddb8f84d9a0453b95f9ad2293eb21f5c7 (patch) | |
tree | 3d145648d3fcf8bd175701803ad11b5b4bab61bd | |
parent | 768d2c055a10a48ad2b3087475e8a9f1bffbeacf (diff) | |
download | jimtcl-3542b58ddb8f84d9a0453b95f9ad2293eb21f5c7.zip jimtcl-3542b58ddb8f84d9a0453b95f9ad2293eb21f5c7.tar.gz jimtcl-3542b58ddb8f84d9a0453b95f9ad2293eb21f5c7.tar.bz2 |
Avoid trying to allocate zero bytes
Some allocators don't like it and others allocate space unnecessarily
Signed-off-by: Steve Bennett <steveb@workware.net.au>
-rw-r--r-- | jim.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -555,7 +555,7 @@ void JimPanicDump(int condition, const char *fmt, ...) void *Jim_Alloc(int size) { - return malloc(size); + return size ? malloc(size) : NULL; } void Jim_Free(void *ptr) |