catch error from as.*printf

This commit is contained in:
Love Hornquist Astrand
2010-05-30 13:44:41 -07:00
parent 077357c848
commit 2b1645aa08
9 changed files with 50 additions and 39 deletions

View File

@@ -155,7 +155,7 @@ OM_uint32 _gsskrb5_add_cred (
if (cred->ccache) {
const char *type, *name;
char *type_name;
char *type_name = NULL;
ret = GSS_S_FAILURE;
@@ -187,8 +187,8 @@ OM_uint32 _gsskrb5_add_cred (
goto failure;
}
asprintf(&type_name, "%s:%s", type, name);
if (type_name == NULL) {
kret = asprintf(&type_name, "%s:%s", type, name);
if (kret < 0 || type_name == NULL) {
*minor_status = ENOMEM;
goto failure;
}