catch error from as.*printf

This commit is contained in:
Love Hornquist Astrand
2010-05-30 14:12:39 -07:00
parent 2b1645aa08
commit 0b2b9d9834
4 changed files with 13 additions and 13 deletions

View File

@@ -428,8 +428,8 @@ krb5_vlog_msg(krb5_context context,
krb5_format_time(context, t, buf, sizeof(buf), TRUE);
}
if(actual == NULL) {
vasprintf(&msg, fmt, ap);
if(msg == NULL)
int ret = vasprintf(&msg, fmt, ap);
if(ret < 0 || msg == NULL)
actual = fmt;
else
actual = msg;