git_extract_argv0_path: do nothing without RUNTIME_PREFIX
[gitweb.git] / worktree.c
index 0486e31ad4a5f5ee02813d06bf9a48e48e3667cb..fa7bc67a50a6d52116b0ca994b473668998f1c3f 100644 (file)
@@ -175,7 +175,7 @@ struct worktree **get_worktrees(unsigned flags)
        struct dirent *d;
        int counter = 0, alloc = 2;
 
-       list = xmalloc(alloc * sizeof(struct worktree *));
+       ALLOC_ARRAY(list, alloc);
 
        list[counter++] = get_main_worktree();