From 81aa563090c33bafbf22f1cde586b77ed526c25f Mon Sep 17 00:00:00 2001 From: Lukas Slebodnik Date: Wed, 27 Nov 2013 10:22:59 +0100 Subject: [PATCH 16/17] NSS: Fix memory leak in sss_setnetgrent struct nss_cmd_ctx was not released in function nss_cmd_setnetgrent_done and it wasn't used in the other function, because getnetgrent creates its own nss_cmd_ctx context. struct nss_cmd_ctx was released after closing client because it was allocated under client context. Memory leak is apparent with long living clients. Resolves: https://fedorahosted.org/sssd/ticket/2170 --- src/responder/nss/nsssrv_netgroup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/responder/nss/nsssrv_netgroup.c b/src/responder/nss/nsssrv_netgroup.c index a1c41968db0becbc42a1c501b666d9aec5241b5f..18e8579372fa39a1b3a60076948bc12bc008fb80 100644 --- a/src/responder/nss/nsssrv_netgroup.c +++ b/src/responder/nss/nsssrv_netgroup.c @@ -687,7 +687,7 @@ static void nss_cmd_setnetgrent_done(struct tevent_req *req) ((uint32_t *)body)[1] = 0; /* reserved */ } - sss_cmd_done(cmdctx->cctx, NULL); + sss_cmd_done(cmdctx->cctx, cmdctx); return; } -- 1.8.4.2