Code

t/README: start testing porcelainish
[git.git] / builtin-update-index.c
index 325cd0944dd81e1531dd097da3069c46a5321523..ef50243452c2f27572c941a5db9365c785f1fbd5 100644 (file)
@@ -490,7 +490,7 @@ int cmd_update_index(int argc, const char **argv, char **envp)
        git_config(git_default_config);
 
        /* We can't free this memory, it becomes part of a linked list parsed atexit() */
-       lock_file = xmalloc(sizeof(struct lock_file));
+       lock_file = xcalloc(1, sizeof(struct lock_file));
 
        newfd = hold_lock_file_for_update(lock_file, get_index_file());
        if (newfd < 0)