While working on periodical updates I've noticed two things:
[PATCH 1/2] removes be_sudo_req from sudo_ctx because it is not used anywhere.
[PATCH 2/2] fixes possible memory leak if sdap_sudo_handler() fails.
From 10307fbcaeadc2306f9867b13d19b1e63df64882 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pavel=20B=C5=99ezina?= <pbrez...@redhat.com> Date: Mon, 19 Dec 2011 13:29:55 +0100 Subject: [PATCH 1/3] SUDO Integration - be_sudo_req removed from sudo_ctx --- src/providers/ldap/sdap_sudo.c | 1 - src/providers/ldap/sdap_sudo.h | 1 - 2 files changed, 0 insertions(+), 2 deletions(-) diff --git a/src/providers/ldap/sdap_sudo.c b/src/providers/ldap/sdap_sudo.c index 9bf77dd..7d4725d 100644 --- a/src/providers/ldap/sdap_sudo.c +++ b/src/providers/ldap/sdap_sudo.c @@ -111,7 +111,6 @@ void sdap_sudo_handler(struct be_req *be_req) sudo_ctx->be_ctx = id_ctx->be; sudo_ctx->be_req = be_req; - sudo_ctx->req = sudo_req; sudo_ctx->sdap_ctx = id_ctx; sudo_ctx->sdap_op = NULL; sudo_ctx->sdap_conn_cache = id_ctx->conn_cache; diff --git a/src/providers/ldap/sdap_sudo.h b/src/providers/ldap/sdap_sudo.h index 2a8bc8d..bfea6bf 100644 --- a/src/providers/ldap/sdap_sudo.h +++ b/src/providers/ldap/sdap_sudo.h @@ -24,7 +24,6 @@ struct sdap_sudo_ctx { struct be_ctx *be_ctx; struct be_req *be_req; - struct be_sudo_req *req; struct sdap_id_ctx *sdap_ctx; struct sdap_id_op *sdap_op; struct sdap_id_conn_cache *sdap_conn_cache; -- 1.7.6.4
From 033263d2ee925b2a8fb3664fcb2e86efe54e82a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pavel=20B=C5=99ezina?= <pbrez...@redhat.com> Date: Mon, 19 Dec 2011 16:19:26 +0100 Subject: [PATCH 2/3] SUDO Integration - fixed memory leak in sdap_sudo_handler() --- src/providers/ldap/sdap_sudo.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/src/providers/ldap/sdap_sudo.c b/src/providers/ldap/sdap_sudo.c index 7d4725d..68cb47c 100644 --- a/src/providers/ldap/sdap_sudo.c +++ b/src/providers/ldap/sdap_sudo.c @@ -142,6 +142,7 @@ void sdap_sudo_handler(struct be_req *be_req) return; fail: + talloc_free(sudo_ctx); be_req->fn(be_req, DP_ERR_FATAL, ret, NULL); } -- 1.7.6.4
_______________________________________________ sssd-devel mailing list sssd-devel@lists.fedorahosted.org https://fedorahosted.org/mailman/listinfo/sssd-devel