Fix more asprintf errors and error code paths.