summaryrefslogtreecommitdiff
path: root/source4/heimdal/lib/krb5/replay.c
diff options
context:
space:
mode:
Diffstat (limited to 'source4/heimdal/lib/krb5/replay.c')
-rw-r--r--source4/heimdal/lib/krb5/replay.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source4/heimdal/lib/krb5/replay.c b/source4/heimdal/lib/krb5/replay.c
index f4eb9032d7..375a4aaba6 100644
--- a/source4/heimdal/lib/krb5/replay.c
+++ b/source4/heimdal/lib/krb5/replay.c
@@ -308,12 +308,12 @@ krb5_get_server_rcache(krb5_context context,
}
strvisx(tmp, piece->data, piece->length, VIS_WHITE | VIS_OCTAL);
#ifdef HAVE_GETEUID
- asprintf(&name, "FILE:rc_%s_%u", tmp, (unsigned)geteuid());
+ ret = asprintf(&name, "FILE:rc_%s_%u", tmp, (unsigned)geteuid());
#else
- asprintf(&name, "FILE:rc_%s", tmp);
+ ret = asprintf(&name, "FILE:rc_%s", tmp);
#endif
free(tmp);
- if(name == NULL) {
+ if(ret < 0 || name == NULL) {
krb5_set_error_message(context, ENOMEM,
N_("malloc: out of memory", ""));
return ENOMEM;