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

@@ -247,7 +247,7 @@ krb5_get_error_message(krb5_context context, krb5_error_code code)
return strdup(msg);
}
if (asprintf(&str, "<unknown error: %d>", (int)code) == -1)
if (asprintf(&str, "<unknown error: %d>", (int)code) == -1 || str == NULL)
return NULL;
return str;