even in tests we should test result of malloc