diff options
author | Volker Lendecke <vl@samba.org> | 2018-08-16 10:51:44 +0200 |
---|---|---|
committer | Andreas Schneider <asn@cryptomilk.org> | 2018-08-17 14:28:51 +0200 |
commit | 6ca5ba5272cc6ff5fbada1b9a801ccc16861eb0e (patch) | |
tree | 0a4cbeb09c1a4e986e53442c0316b0eef7bcddd5 /source3/libgpo | |
parent | c2ea10077715fb2a554a9f39b2ff49338bd8a124 (diff) | |
download | samba-6ca5ba5272cc6ff5fbada1b9a801ccc16861eb0e.tar.gz |
lib: Pass mem_ctx to cache_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>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Fri Aug 17 14:28:51 CEST 2018 on sn-devel-144
Diffstat (limited to 'source3/libgpo')
-rw-r--r-- | source3/libgpo/gpext/registry.c | 2 | ||||
-rw-r--r-- | source3/libgpo/gpext/scripts.c | 2 | ||||
-rw-r--r-- | source3/libgpo/gpext/security.c | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/source3/libgpo/gpext/registry.c b/source3/libgpo/gpext/registry.c index 5d51bdff6e9..525493fcb2c 100644 --- a/source3/libgpo/gpext/registry.c +++ b/source3/libgpo/gpext/registry.c @@ -291,7 +291,7 @@ static NTSTATUS registry_process_group_policy(TALLOC_CTX *mem_ctx, size_t num_entries = 0; char *unix_path = NULL; const struct GROUP_POLICY_OBJECT *gpo; - char *gpo_cache_path = cache_path(GPO_CACHE_DIR); + char *gpo_cache_path = cache_path(talloc_tos(), GPO_CACHE_DIR); if (gpo_cache_path == NULL) { return NT_STATUS_NO_MEMORY; } diff --git a/source3/libgpo/gpext/scripts.c b/source3/libgpo/gpext/scripts.c index de664133b87..dfa9958e326 100644 --- a/source3/libgpo/gpext/scripts.c +++ b/source3/libgpo/gpext/scripts.c @@ -364,7 +364,7 @@ static NTSTATUS scripts_process_group_policy(TALLOC_CTX *mem_ctx, GP_SCRIPTS_INI_LOGOFF }; const struct GROUP_POLICY_OBJECT *gpo; - char *gpo_cache_path = cache_path(GPO_CACHE_DIR); + char *gpo_cache_path = cache_path(talloc_tos(), GPO_CACHE_DIR); if (gpo_cache_path == NULL) { return NT_STATUS_NO_MEMORY; } diff --git a/source3/libgpo/gpext/security.c b/source3/libgpo/gpext/security.c index b6b7ca08e62..a915eec61e4 100644 --- a/source3/libgpo/gpext/security.c +++ b/source3/libgpo/gpext/security.c @@ -154,7 +154,7 @@ static NTSTATUS security_process_group_policy(TALLOC_CTX *mem_ctx, char *unix_path = NULL; struct gp_inifile_context *ini_ctx = NULL; const struct GROUP_POLICY_OBJECT *gpo; - char *gpo_cache_path = cache_path(GPO_CACHE_DIR); + char *gpo_cache_path = cache_path(talloc_tos(), GPO_CACHE_DIR); if (gpo_cache_path == NULL) { return NT_STATUS_NO_MEMORY; } |