More malloc checks