]> git.xonotic.org Git - xonotic/gmqcc.git/blobdiff - pak.c
Fix possible bug
[xonotic/gmqcc.git] / pak.c
diff --git a/pak.c b/pak.c
index f31ec757b11fe27c67d79cd4551c3367dbcfd941..043ef8957a53ffed4817fda9bb5d3f9a8e28fc14 100644 (file)
--- a/pak.c
+++ b/pak.c
@@ -94,7 +94,6 @@ static void pak_tree_build(const char *entry) {
     directory = (char *)mem_a(56);
 
     memset(pathsplit, 0, 56);
-    memset(directory, 0, 56);
 
     strncpy(directory, entry, 56);
     for (itr = 0; (token = pak_tree_sep(&directory, "/")) != NULL; itr++) {
@@ -195,6 +194,7 @@ static pak_file_t *pak_open_write(const char *file) {
          */   
         /* TODO backup directory clean */
 
+        mem_d(pak);
         return NULL;
     }