summaryrefslogtreecommitdiffstats
path: root/server/confdb
diff options
context:
space:
mode:
authorStephen Gallagher <sgallagh@redhat.com>2009-06-19 11:09:33 -0400
committerStephen Gallagher <sgallagh@redhat.com>2009-06-19 11:58:10 -0400
commit673c2ce9b3371241de872b2bd206f732485888cb (patch)
tree0bfc814d55de2f240e88b110a8adf72a40c7f8f0 /server/confdb
parenta8f3c276d5f408d39b2474f62e1f80cc97e5a2b0 (diff)
downloadsssd-673c2ce9b3371241de872b2bd206f732485888cb.tar.gz
sssd-673c2ce9b3371241de872b2bd206f732485888cb.tar.xz
sssd-673c2ce9b3371241de872b2bd206f732485888cb.zip
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.
Diffstat (limited to 'server/confdb')
-rw-r--r--server/confdb/confdb.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/server/confdb/confdb.c b/server/confdb/confdb.c
index 8eefcfb6f..8b8dc7463 100644
--- a/server/confdb/confdb.c
+++ b/server/confdb/confdb.c
@@ -709,6 +709,10 @@ int confdb_get_domain(struct confdb_ctx *cdb,
}
domain = talloc_zero(mem_ctx, struct sss_domain_info);
+ if (!domain) {
+ ret = ENOMEM;
+ goto done;
+ }
tmp = ldb_msg_find_attr_as_string(res->msgs[0], "cn", NULL);
if (!tmp) {