mirror of https://github.com/neutrinolabs/xrdp
make sure malloc didn't return nil
This commit is contained in:
parent
422bbf3a89
commit
f82cf80d4f
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue