Handles magic cookie allocation error