Skip to content

Commit 8122ef9

Browse files
committed
worktree: fix calloc of the wrong object type
1 parent 836ec31 commit 8122ef9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/worktree.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ static int open_worktree_dir(git_worktree **out, const char *parent, const char
131131
goto out;
132132
}
133133

134-
if ((wt = git__calloc(1, sizeof(struct git_repository))) == NULL) {
134+
if ((wt = git__calloc(1, sizeof(*wt))) == NULL) {
135135
error = -1;
136136
goto out;
137137
}

0 commit comments

Comments
 (0)