diff options
author | jsorg71 <jsorg71> | 2007-07-26 05:40:27 +0000 |
---|---|---|
committer | jsorg71 <jsorg71> | 2007-07-26 05:40:27 +0000 |
commit | f82cf80d4f474f344b453dd6df95b194028a0844 (patch) | |
tree | d5d31b9cf3a1d7c02b48c4855189e496df325041 /common | |
parent | 422bbf3a8991f30496c20f095bcb03c3e299f07a (diff) | |
download | xrdp-proprietary-f82cf80d4f474f344b453dd6df95b194028a0844.tar.gz xrdp-proprietary-f82cf80d4f474f344b453dd6df95b194028a0844.zip |
make sure malloc didn't return nil
Diffstat (limited to 'common')
-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; } |