]> git.ipfire.org Git - zone-sync.git/commitdiff
main: Allocate a memory context
authorMichael Tremer <michael.tremer@ipfire.org>
Mon, 11 May 2026 08:44:42 +0000 (08:44 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Mon, 11 May 2026 08:44:42 +0000 (08:44 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
main.c

diff --git a/main.c b/main.c
index c8c900f32c8ba2802e9ac46a4b6bc188c051c9c8..4feebc0c81468440cfb40f440583ebb77d4532d0 100644 (file)
--- a/main.c
+++ b/main.c
 #include <argp.h>
 #include <syslog.h>
 
+#include <isc/mem.h>
+
 typedef struct ctx {
        int log_level;
+
+       // Memory Context
+       isc_mem_t* memctx;
 } ctx_t;
 
 const char* argp_program_version = PACKAGE_VERSION;
@@ -79,5 +84,8 @@ int main(int argc, char* argv[]) {
        if (r)
                return r;
 
+       // Allocate a new memory context
+       isc_mem_create(&ctx.memctx);
+
        return 0;
 }