From 718bce1f8bad38354d7e52d6bf588e3516c0f3c6 Mon Sep 17 00:00:00 2001 From: Fabiano FidĂȘncio Date: Mar 16 2018 15:03:52 +0000 Subject: NSS: Remove dead code This piece of code introduced as part of 4049b63f8c most likely by mistake and can be removed without causing any harm. Signed-off-by: Fabiano FidĂȘncio Reviewed-by: Jakub Hrozek --- diff --git a/src/responder/nss/nss_protocol_netgr.c b/src/responder/nss/nss_protocol_netgr.c index ed04fd2..099485f 100644 --- a/src/responder/nss/nss_protocol_netgr.c +++ b/src/responder/nss/nss_protocol_netgr.c @@ -107,7 +107,6 @@ nss_protocol_fill_netgrent(struct nss_ctx *nss_ctx, struct sss_packet *packet, struct cache_req_result *result) { - TALLOC_CTX *tmp_ctx; struct sysdb_netgroup_ctx **entries; struct sysdb_netgroup_ctx *entry; struct nss_enum_index *idx; @@ -118,11 +117,6 @@ nss_protocol_fill_netgrent(struct nss_ctx *nss_ctx, errno_t ret; unsigned int start; - tmp_ctx = talloc_new(NULL); - if (tmp_ctx == NULL) { - return ENOMEM; - } - idx = cmd_ctx->enum_index; entries = cmd_ctx->enum_ctx->netgroup; @@ -148,7 +142,6 @@ nss_protocol_fill_netgrent(struct nss_ctx *nss_ctx, break; } - talloc_free_children(tmp_ctx); entry = entries[idx->result]; switch (entry->type) { @@ -174,8 +167,6 @@ nss_protocol_fill_netgrent(struct nss_ctx *nss_ctx, ret = EOK; done: - talloc_free(tmp_ctx); - if (ret != EOK) { sss_packet_set_size(packet, 0); return ret;