diff --git a/src/knot/zone/timers.c b/src/knot/zone/timers.c index 9492eb12065f0748a9f39eb863ef45bd74144e42..63c9ce1d1e16a3fc25645239b1ab5dbcff6c9065 100644 --- a/src/knot/zone/timers.c +++ b/src/knot/zone/timers.c @@ -15,6 +15,7 @@ */ #include "libknot/dname.h" +#include "common/mem.h" #include "common/namedb/namedb.h" #include "common/namedb/namedb_lmdb.h" #include "knot/zone/timers.h" @@ -125,7 +126,16 @@ knot_namedb_t *open_timers_db(const char *storage) // No-op if we don't have lmdb, all other operations will no-op as well then return NULL; #else - return namedb_lmdb_api()->init(storage, NULL); + char *path = sprintf_alloc("%s/timers", storage); + if (!path) { + return NULL; + } + + knot_namedb_t *db = namedb_lmdb_api()->init(path, NULL); + + free(path); + + return db; #endif }