Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
git2
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
git2
Commits
0ad2372b
Unverified
Commit
0ad2372b
authored
Apr 20, 2018
by
Patrick Steinhardt
Committed by
GitHub
Apr 20, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #4636 from tiennou/fix/leaks
Fix leaks in master
parents
232dd4de
25100d6d
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
1 deletions
+5
-1
src/refspec.c
+4
-1
tests/worktree/worktree.c
+1
-0
No files found.
src/refspec.c
View file @
0ad2372b
...
@@ -304,6 +304,7 @@ int git_refspec__dwim_one(git_vector *out, git_refspec *spec, git_vector *refs)
...
@@ -304,6 +304,7 @@ int git_refspec__dwim_one(git_vector *out, git_refspec *spec, git_vector *refs)
git_buf
buf
=
GIT_BUF_INIT
;
git_buf
buf
=
GIT_BUF_INIT
;
size_t
j
,
pos
;
size_t
j
,
pos
;
git_remote_head
key
;
git_remote_head
key
;
git_refspec
*
cur
;
const
char
*
formatters
[]
=
{
const
char
*
formatters
[]
=
{
GIT_REFS_DIR
"%s"
,
GIT_REFS_DIR
"%s"
,
...
@@ -312,7 +313,9 @@ int git_refspec__dwim_one(git_vector *out, git_refspec *spec, git_vector *refs)
...
@@ -312,7 +313,9 @@ int git_refspec__dwim_one(git_vector *out, git_refspec *spec, git_vector *refs)
NULL
NULL
};
};
git_refspec
*
cur
=
git__calloc
(
1
,
sizeof
(
git_refspec
));
assert
(
out
&&
spec
&&
refs
);
cur
=
git__calloc
(
1
,
sizeof
(
git_refspec
));
GITERR_CHECK_ALLOC
(
cur
);
GITERR_CHECK_ALLOC
(
cur
);
cur
->
force
=
spec
->
force
;
cur
->
force
=
spec
->
force
;
...
...
tests/worktree/worktree.c
View file @
0ad2372b
...
@@ -300,6 +300,7 @@ void test_worktree_worktree__add_with_explicit_branch(void)
...
@@ -300,6 +300,7 @@ void test_worktree_worktree__add_with_explicit_branch(void)
git_reference_free
(
branch
);
git_reference_free
(
branch
);
git_reference_free
(
wthead
);
git_reference_free
(
wthead
);
git_repository_free
(
wtrepo
);
git_repository_free
(
wtrepo
);
git_worktree_free
(
wt
);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment