It's not an esthetic reason. Memory ownership rules must be clearly defined, either the error message is always allocated dynamically, or it never is.

Also, you really should free the memory even if the process is about to exit. Just feels cleaner. Did you run your version under valgrind?