Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
if (mappings == NULL) {
return false;
}
- string_replace_cmaps = string_replace_init_map(mappings);
+ string_replace_cmaps = string_replace_init_map(
+ handle->conn->sconn, mappings);
TALLOC_FREE(mappings);
}
return True;
}
-struct char_mappings **string_replace_init_map(const char **mappings)
+struct char_mappings **string_replace_init_map(TALLOC_CTX *mem_ctx,
+ const char **mappings)
{
int i;
char *tmp;
return NULL;
}
- cmaps = TALLOC_ZERO(NULL, MAP_NUM * sizeof(struct char_mappings *));
+ cmaps = TALLOC_ZERO(mem_ctx, MAP_NUM * sizeof(struct char_mappings *));
if (cmaps == NULL) {
return NULL;
}
struct char_mappings;
-struct char_mappings **string_replace_init_map(const char **mappings);
+struct char_mappings **string_replace_init_map(TALLOC_CTX *mem_ctx,
+ const char **mappings);
NTSTATUS string_replace_allocate(connection_struct *conn,
const char *name_in,
return sme;
}
- sme->mappings = string_replace_init_map(mappings);
+ sme->mappings = string_replace_init_map(sme, mappings);
return sme;
}