diff options
author | Volker Lendecke <vl@samba.org> | 2018-08-16 10:51:44 +0200 |
---|---|---|
committer | Andreas Schneider <asn@cryptomilk.org> | 2018-08-17 11:30:11 +0200 |
commit | c2ea10077715fb2a554a9f39b2ff49338bd8a124 (patch) | |
tree | 854522aa679e6396c94bace54639025232aaf084 /source3/nmbd | |
parent | f986a73b240ea61df1d4664b9c3c6d0858b17111 (diff) | |
download | samba-c2ea10077715fb2a554a9f39b2ff49338bd8a124.tar.gz |
lib: Pass mem_ctx to state_path()
Fix a confusing API: Many places TALLOC_FREE the path where it's not
clear you have to do it.
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Diffstat (limited to 'source3/nmbd')
-rw-r--r-- | source3/nmbd/nmbd_winsserver.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source3/nmbd/nmbd_winsserver.c b/source3/nmbd/nmbd_winsserver.c index cd7d3b7fc75..c34bfaea3be 100644 --- a/source3/nmbd/nmbd_winsserver.c +++ b/source3/nmbd/nmbd_winsserver.c @@ -601,7 +601,7 @@ bool initialise_wins(void) return True; } - db_path = state_path("wins.tdb"); + db_path = state_path(talloc_tos(), "wins.tdb"); if (db_path == NULL) { return false; } @@ -620,7 +620,7 @@ bool initialise_wins(void) add_samba_names_to_subnet(wins_server_subnet); - list_path = state_path(WINS_LIST); + list_path = state_path(talloc_tos(), WINS_LIST); if (list_path == NULL) { tdb_close(wins_tdb); return false; @@ -2493,7 +2493,7 @@ void wins_write_database(time_t t, bool background) } } - if (!(fname = state_path(WINS_LIST))) { + if (!(fname = state_path(talloc_tos(), WINS_LIST))) { goto err_exit; } /* This is safe as the 0 length means "don't expand". */ |