diff options
author | Andrew Tridgell <tridge@samba.org> | 2004-10-25 02:57:20 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:04:37 -0500 |
commit | 304a9eafd4382fc48085b9d00ca0520b637389aa (patch) | |
tree | 38631f3b723c0411236e56f4943f7ed9fdfbc571 /source4 | |
parent | 3cf018b517de0afa006ac14d5185e3c95d8a923b (diff) | |
download | samba-304a9eafd4382fc48085b9d00ca0520b637389aa.tar.gz samba-304a9eafd4382fc48085b9d00ca0520b637389aa.tar.bz2 samba-304a9eafd4382fc48085b9d00ca0520b637389aa.zip |
r3181: shutdown the secrets db on exit so we don't constantly get talloc leak warnings
(This used to be commit 11713da2efc6d45c5594289efa0b6c0e594e6d2e)
Diffstat (limited to 'source4')
-rw-r--r-- | source4/passdb/secrets.c | 6 | ||||
-rw-r--r-- | source4/smbd/process_standard.c | 3 |
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); } |