tsan: return 0 on malloc() failure instead of crashing