From fbf882e770474a60022d93c009f277a2d2674e42 Mon Sep 17 00:00:00 2001 From: Robbie Harwood Date: Feb 28 2017 17:45:27 +0000 Subject: Fix asprintf(3) call in ensure_segregated_ccache() Signed-off-by: Robbie Harwood Reviewed-by: Simo Sorce PR: #53 --- diff --git a/proxy/src/gp_creds.c b/proxy/src/gp_creds.c index 0e5532f..db5b4b2 100644 --- a/proxy/src/gp_creds.c +++ b/proxy/src/gp_creds.c @@ -276,7 +276,7 @@ static int ensure_segregated_ccache(struct gp_call_ctx *gpcall, } while (tid == -1 && errno == EINTR); ret = asprintf(&buf, "MEMORY:internal_%d", tid); - if (!buf) { + if (ret == -1) { return ENOMEM; }