diff options
-rw-r--r-- | common/os_calls.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/common/os_calls.c b/common/os_calls.c index 8a73c43e..c833e6f5 100644 --- a/common/os_calls.c +++ b/common/os_calls.c @@ -85,7 +85,10 @@ g_malloc(int size, int zero) rv = (char*)malloc(size); if (zero) { - memset(rv, 0, size); + if (rv != 0) + { + memset(rv, 0, size); + } } return rv; } |