summaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
authorjsorg71 <jsorg71>2007-07-26 05:40:27 +0000
committerjsorg71 <jsorg71>2007-07-26 05:40:27 +0000
commitf82cf80d4f474f344b453dd6df95b194028a0844 (patch)
treed5d31b9cf3a1d7c02b48c4855189e496df325041 /common
parent422bbf3a8991f30496c20f095bcb03c3e299f07a (diff)
downloadxrdp-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.c5
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;
}