make sure malloc didn't return nil

ulab-original
jsorg71 18 years ago
parent 422bbf3a89
commit f82cf80d4f

@ -84,9 +84,12 @@ g_malloc(int size, int zero)
rv = (char*)malloc(size); rv = (char*)malloc(size);
if (zero) if (zero)
{
if (rv != 0)
{ {
memset(rv, 0, size); memset(rv, 0, size);
} }
}
return rv; return rv;
} }

Loading…
Cancel
Save