summaryrefslogtreecommitdiff
path: root/source3/registry
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2018-08-16 10:51:44 +0200
committerAndreas Schneider <asn@cryptomilk.org>2018-08-17 11:30:11 +0200
commitc2ea10077715fb2a554a9f39b2ff49338bd8a124 (patch)
tree854522aa679e6396c94bace54639025232aaf084 /source3/registry
parentf986a73b240ea61df1d4664b9c3c6d0858b17111 (diff)
downloadsamba-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/registry')
-rw-r--r--source3/registry/reg_backend_db.c4
-rw-r--r--source3/registry/reg_perfcount.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/source3/registry/reg_backend_db.c b/source3/registry/reg_backend_db.c
index 928572e8a5a..aa97d60abec 100644
--- a/source3/registry/reg_backend_db.c
+++ b/source3/registry/reg_backend_db.c
@@ -733,7 +733,7 @@ WERROR regdb_init(void)
return WERR_OK;
}
- db_path = state_path("registry.tdb");
+ db_path = state_path(talloc_tos(), "registry.tdb");
if (db_path == NULL) {
return WERR_NOT_ENOUGH_MEMORY;
}
@@ -861,7 +861,7 @@ WERROR regdb_open( void )
return WERR_OK;
}
- db_path = state_path("registry.tdb");
+ db_path = state_path(talloc_tos(), "registry.tdb");
if (db_path == NULL) {
return WERR_NOT_ENOUGH_MEMORY;
}
diff --git a/source3/registry/reg_perfcount.c b/source3/registry/reg_perfcount.c
index e31f8991642..6fa96f314fb 100644
--- a/source3/registry/reg_perfcount.c
+++ b/source3/registry/reg_perfcount.c
@@ -48,7 +48,7 @@ static char *counters_directory(const char *dbname)
char *db_subpath = NULL;
char *ret = NULL;
- dir_path = state_path(PERFCOUNTDIR);
+ dir_path = state_path(talloc_tos(), PERFCOUNTDIR);
if (dir_path == NULL) {
return NULL;
}
@@ -64,7 +64,7 @@ static char *counters_directory(const char *dbname)
return NULL;
}
- ret = state_path(db_subpath);
+ ret = state_path(talloc_tos(), db_subpath);
TALLOC_FREE(dir_path);
return ret;
}