* @retval Pointer to a string containing the full path.
**/
-static char *xx_path(const char *name, const char *rootpath)
+static char *xx_path(TALLOC_CTX *mem_ctx,
+ const char *name,
+ const char *rootpath)
{
char *fname = NULL;
- fname = talloc_strdup(talloc_tos(), rootpath);
+ fname = talloc_strdup(mem_ctx, rootpath);
if (!fname) {
return NULL;
}
char *lock_path(const char *name)
{
- return xx_path(name, lp_lock_directory());
+ return xx_path(talloc_tos(), name, lp_lock_directory());
}
/**
char *state_path(const char *name)
{
- return xx_path(name, lp_state_directory());
+ return xx_path(talloc_tos(), name, lp_state_directory());
}
/**
char *cache_path(const char *name)
{
- return xx_path(name, lp_cache_directory());
+ return xx_path(talloc_tos(), name, lp_cache_directory());
}
/**