summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source4/passdb/secrets.c6
-rw-r--r--source4/smbd/process_standard.c3
2 files changed, 9 insertions, 0 deletions
diff --git a/source4/passdb/secrets.c b/source4/passdb/secrets.c
index add3845d75..d13e61223d 100644
--- a/source4/passdb/secrets.c
+++ b/source4/passdb/secrets.c
@@ -45,6 +45,12 @@ static void get_rand_seed(int *new_seed)
}
}
+/* close the secrets database */
+void secrets_shutdown(void)
+{
+ talloc_free(tdb);
+}
+
/* open up the secrets database */
BOOL secrets_init(void)
{
diff --git a/source4/smbd/process_standard.c b/source4/smbd/process_standard.c
index d70cfa676b..98810af028 100644
--- a/source4/smbd/process_standard.c
+++ b/source4/smbd/process_standard.c
@@ -101,6 +101,9 @@ static void standard_terminate_connection(struct server_connection *conn, const
which makes leak checking easier */
init_iconv();
+ /* the secrets db should really hang off the connection structure */
+ secrets_shutdown();
+
/* terminate this process */
exit(0);
}