gssproxy/Fix-asprintf-3-call-in-ensure_segregated_ccache.patch

27 lines
870 B
Diff

From 6e2ee182afa62d7003fad8110f7877410ddc7d6d Mon Sep 17 00:00:00 2001
From: Robbie Harwood <rharwood@redhat.com>
Date: Mon, 27 Feb 2017 14:44:06 -0500
Subject: [PATCH] Fix asprintf(3) call in ensure_segregated_ccache()
Signed-off-by: Robbie Harwood <rharwood@redhat.com>
Reviewed-by: Simo Sorce <simo@redhat.com>
PR: #53
(cherry picked from commit fbf882e770474a60022d93c009f277a2d2674e42)
---
proxy/src/gp_creds.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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;
}