If either of these fails, you should surely tidy *destination away, set it to NULL and return -1.