Hi,

this patch fixes the handling of the global context in the leak test
routine of some unit tests. Now it is initialize only once.

bye,
Sumit
From 0cc6afa7dd30d7eec063639721fe45f2caac822b Mon Sep 17 00:00:00 2001
From: Sumit Bose <sb...@redhat.com>
Date: Fri, 5 Feb 2010 13:02:32 +0100
Subject: [PATCH] Fix handling of the global context in the leak detector

---
 server/tests/common.c |    2 ++
 server/tests/common.h |    2 +-
 2 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/server/tests/common.c b/server/tests/common.c
index dad9dc6..50dc61b 100644
--- a/server/tests/common.c
+++ b/server/tests/common.c
@@ -29,6 +29,8 @@
 #include "util/dlinklist.h"
 #include "util/util.h"
 
+TALLOC_CTX *global_talloc_context = NULL;
+
 struct size_snapshot {
     struct size_snapshot *prev;
     struct size_snapshot *next;
diff --git a/server/tests/common.h b/server/tests/common.h
index 44e2d9a..0e954d7 100644
--- a/server/tests/common.h
+++ b/server/tests/common.h
@@ -3,7 +3,7 @@
 
 #include <talloc.h>
 
-TALLOC_CTX *global_talloc_context;
+extern TALLOC_CTX *global_talloc_context;
 
 #define check_leaks(ctx, bytes) _check_leaks((ctx), (bytes), __location__)
 void _check_leaks(TALLOC_CTX *ctx,
-- 
1.6.6

_______________________________________________
sssd-devel mailing list
sssd-devel@lists.fedorahosted.org
https://fedorahosted.org/mailman/listinfo/sssd-devel

Reply via email to