diff --git a/src/module/repo.c b/src/module/repo.c
index 1647fa347143ac225d3eeec8c4d49b23bfa107df..23df64ffce2d1ecd994e4417afc96de9502e33f3 100644
--- a/src/module/repo.c
+++ b/src/module/repo.c
@@ -7,6 +7,7 @@
 #include <strings.h>
 #include <limits.h>
 #include <stdlib.h>
+#include <stdlib.h>
 #include <unistd.h>
 #include <sys/stat.h>
 #include <fcntl.h>
@@ -339,7 +340,8 @@ __handle_got_json(volatile sqlite3 *db, struct lkt_repo *repo,
     int32_t integer, err;
     struct kara kara;
     long filestamp = 0, timestamp = 0;
-    char mkvpropedit[PATH_MAX], url[URL_MAX_LEN];
+    char *mkvpropedit = safe_zero_malloc(sizeof(char) * PATH_MAX);
+    char *url         = safe_zero_malloc(sizeof(char) * URL_MAX_LEN);
     int current_id;
     struct lkt_state *srv = repo->srv;
     struct timespec time_sleep = {
@@ -448,6 +450,8 @@ do_it:
     }
     LOG_INFO("REPO", "Updated %ld karas and ignored %ld karas, total is %ld",
              update_count, ignored_count, len);
+    free(mkvpropedit);
+    free(url);
 }
 
 static inline void