summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephen Gallagher <sgallagh@redhat.com>2010-06-09 10:40:49 -0400
committerStephen Gallagher <sgallagh@redhat.com>2010-06-10 10:17:22 -0400
commit92dc62741c10110671fca89baff3156bed5623c4 (patch)
tree6ceba306711d0ead01ca76bdd67e708c02f33eb6
parent3fcf293d7098e8373cff0088bcadc23b0b7f020c (diff)
downloadsssd_unused-92dc62741c10110671fca89baff3156bed5623c4.tar.gz
sssd_unused-92dc62741c10110671fca89baff3156bed5623c4.tar.xz
sssd_unused-92dc62741c10110671fca89baff3156bed5623c4.zip
Check return code of hash_delete in proxy_child_destructor
We can't do much about an error here, but we should be reporting it. https://fedorahosted.org/sssd/ticket/534
-rw-r--r--src/providers/proxy/proxy.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/providers/proxy/proxy.c b/src/providers/proxy/proxy.c
index 7ff74a1c..443e603e 100644
--- a/src/providers/proxy/proxy.c
+++ b/src/providers/proxy/proxy.c
@@ -191,11 +191,17 @@ static int proxy_child_destructor(TALLOC_CTX *ctx)
struct proxy_child_ctx *child_ctx =
talloc_get_type(ctx, struct proxy_child_ctx);
hash_key_t key;
+ int hret;
DEBUG(8, ("Removing proxy child id [%d]\n", child_ctx->id));
key.type = HASH_KEY_ULONG;
key.ul = child_ctx->id;
- hash_delete(child_ctx->auth_ctx->request_table, &key);
+ hret = hash_delete(child_ctx->auth_ctx->request_table, &key);
+ if (!(hret == HASH_SUCCESS ||
+ hret == HASH_ERROR_KEY_NOT_FOUND)) {
+ DEBUG(1, ("Hash error [%d][%s]\n", hret, hash_error_string(hret)));
+ /* Nothing we can do about this, so just continue */
+ }
return 0;
}