Nicer exception-safe malloc()ing