Hi,
another small fix for the monitor code. I think the contexts come from way ago when we supported online configuration changes, but to me, they just make the code more confusing.
On (09/10/14 20:14), Jakub Hrozek wrote:
Hi,
another small fix for the monitor code. I think the contexts come from way ago when we supported online configuration changes, but to me, they just make the code more confusing.
From b2eeb0e38fcf17b927e29fc8f119c90956abae74 Mon Sep 17 00:00:00 2001 From: Jakub Hrozek jhrozek@redhat.com Date: Tue, 7 Oct 2014 13:02:08 +0200 Subject: [PATCH] MONITOR: Remove useless memory contexts
src/monitor/monitor.c | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-)
diff --git a/src/monitor/monitor.c b/src/monitor/monitor.c index 46b630c2540065c3a0eeb3575842cf9f56c706e1..624e45026b01842ab81d8c37d50751977185d20c 100644 --- a/src/monitor/monitor.c +++ b/src/monitor/monitor.c @@ -154,9 +154,7 @@ struct config_file_ctx { struct mt_ctx { struct tevent_context *ev; struct confdb_ctx *cdb;
- TALLOC_CTX *domain_ctx; /* Memory context for domain list */ struct sss_domain_info *domains;
- TALLOC_CTX *service_ctx; /* Memory context for services */
These talloc contexts were introduced in commit 673c2ce9b3371241de872b2bd206f732485888cb.
The description of this commit says: Fix segfault in update_monitor_config
We were stealing the memory context of only the first value in the linked-list of domains (and also services). This patch adds a memory context to hold the lists so that can be stolen along with all of the entries.
Function update_monitor_config was removed 4 years ago. We can safely remove them as well.
ACK
LS
On Fri, Oct 10, 2014 at 08:28:10AM +0200, Lukas Slebodnik wrote:
On (09/10/14 20:14), Jakub Hrozek wrote:
Hi,
another small fix for the monitor code. I think the contexts come from way ago when we supported online configuration changes, but to me, they just make the code more confusing.
From b2eeb0e38fcf17b927e29fc8f119c90956abae74 Mon Sep 17 00:00:00 2001 From: Jakub Hrozek jhrozek@redhat.com Date: Tue, 7 Oct 2014 13:02:08 +0200 Subject: [PATCH] MONITOR: Remove useless memory contexts
src/monitor/monitor.c | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-)
diff --git a/src/monitor/monitor.c b/src/monitor/monitor.c index 46b630c2540065c3a0eeb3575842cf9f56c706e1..624e45026b01842ab81d8c37d50751977185d20c 100644 --- a/src/monitor/monitor.c +++ b/src/monitor/monitor.c @@ -154,9 +154,7 @@ struct config_file_ctx { struct mt_ctx { struct tevent_context *ev; struct confdb_ctx *cdb;
- TALLOC_CTX *domain_ctx; /* Memory context for domain list */ struct sss_domain_info *domains;
- TALLOC_CTX *service_ctx; /* Memory context for services */
These talloc contexts were introduced in commit 673c2ce9b3371241de872b2bd206f732485888cb.
The description of this commit says: Fix segfault in update_monitor_config
We were stealing the memory context of only the first value in the linked-list of domains (and also services). This patch adds a memory context to hold the lists so that can be stolen along with all of the entries.
Function update_monitor_config was removed 4 years ago. We can safely remove them as well.
right, that was the live-update functionality..
ACK
thanks for the review. Pushed to master as: 5ecc36322d9ccc9a9266263fcea8598ca89f4426
sssd-devel@lists.fedorahosted.org