summaryrefslogtreecommitdiff
path: root/source3/intl/lang_tdb.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/intl/lang_tdb.c')
-rw-r--r--source3/intl/lang_tdb.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/source3/intl/lang_tdb.c b/source3/intl/lang_tdb.c
index 8fcb9f2bfc..6070e29e5a 100644
--- a/source3/intl/lang_tdb.c
+++ b/source3/intl/lang_tdb.c
@@ -20,6 +20,7 @@
#include "includes.h"
#include "system/filesys.h"
#include "intl/lang_tdb.h"
+#include "util_tdb.h"
static TDB_CONTEXT *tdb;
@@ -130,7 +131,7 @@ bool lang_tdb_init(const char *lang)
return True;
if (asprintf(&msg_path, "%s.msg",
- data_path((const char *)lang)) == -1) {
+ data_path(talloc_tos(), (const char *)lang)) == -1) {
DEBUG(0, ("asprintf failed\n"));
goto done;
}
@@ -236,7 +237,7 @@ const char *lang_msg(const char *msgid)
void lang_msg_free(const char *msgstr)
{
if (!tdb) return;
- free((void *)msgstr);
+ free(discard_const_p(void, msgstr));
}
/*