summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJan Zeleny <jzeleny@redhat.com>2010-08-30 14:57:36 +0200
committerStephen Gallagher <sgallagh@redhat.com>2010-09-02 12:23:19 -0400
commite50c0f83b874288332c1c97a181b18206bfe1be2 (patch)
tree0215be5c12e6fcf2862d83fa5cf987c9c5f69d23 /src
parent368635f63372bb3b4c0debf8335a3246821ceac6 (diff)
downloadsssd-e50c0f83b874288332c1c97a181b18206bfe1be2.tar.gz
sssd-e50c0f83b874288332c1c97a181b18206bfe1be2.tar.bz2
sssd-e50c0f83b874288332c1c97a181b18206bfe1be2.zip
Fixed uninialized value in proxy_id provider
In function get_pw_name when allocation of memory fails, there were two codepaths which could cause printing of undefined value. This patch fixes both cases. Ticket: #580
Diffstat (limited to 'src')
-rw-r--r--src/providers/proxy/proxy_id.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/providers/proxy/proxy_id.c b/src/providers/proxy/proxy_id.c
index 8536b938..9d9f2813 100644
--- a/src/providers/proxy/proxy_id.c
+++ b/src/providers/proxy/proxy_id.c
@@ -52,6 +52,7 @@ static int get_pw_name(TALLOC_CTX *mem_ctx,
pwd = talloc_zero(tmpctx, struct passwd);
if (!pwd) {
ret = ENOMEM;
+ status = NSS_STATUS_TRYAGAIN;
goto done;
}
@@ -59,6 +60,7 @@ static int get_pw_name(TALLOC_CTX *mem_ctx,
buffer = talloc_size(tmpctx, buflen);
if (!buffer) {
ret = ENOMEM;
+ status = NSS_STATUS_TRYAGAIN;
goto done;
}