r5296: - only include the tdb headers where they are needed
[samba.git] / source4 / intl / lang_tdb.c
index 05e3a7ba638f5ae137fbbb3fb52bc61b284f41a7..660323682db141ec3282963ab5f79dca91a7e8d0 100644 (file)
@@ -19,6 +19,8 @@
 */
 
 #include "includes.h"
+#include "lib/tdb/include/tdbutil.h"
+#include "system/time.h"
 
 static TDB_CONTEXT *tdb;
 
@@ -132,7 +134,7 @@ BOOL lang_tdb_init(const char *lang)
        if (stat(msg_path, &st) != 0) {
                /* the msg file isn't available */
                free(msg_path);
-               talloc_destroy(mem_ctx);
+               talloc_free(mem_ctx);
                return False;
        }
        
@@ -144,14 +146,14 @@ BOOL lang_tdb_init(const char *lang)
                tdb = tdb_open(path, 0, TDB_DEFAULT, O_RDONLY, 0);
                free(path);
                free(msg_path);
-               talloc_destroy(mem_ctx);
+               talloc_free(mem_ctx);
                if (!tdb) return False;
                current_lang = strdup(lang);
                return True;
        }
 
        free(path);
-       talloc_destroy(mem_ctx);
+       talloc_free(mem_ctx);
 
        loadtime = tdb_fetch_int32(tdb, "/LOADTIME/");