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
78db0239
Commit
78db0239
authored
Mar 24, 2015
by
Edward Thomson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
squash some leaks
parent
c5e07187
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
5 deletions
+7
-5
src/refs.c
+3
-5
src/repository.c
+2
-0
tests/filter/file.c
+2
-0
No files found.
src/refs.c
View file @
78db0239
...
...
@@ -1052,12 +1052,10 @@ static int get_terminal(git_reference **out, git_repository *repo, const char *r
error
=
0
;
}
else
{
error
=
get_terminal
(
out
,
repo
,
git_reference_symbolic_target
(
ref
),
nesting
+
1
);
if
(
error
==
GIT_ENOTFOUND
)
{
if
(
!*
out
)
/* set by the error case in lookup above */
*
out
=
ref
;
}
else
{
if
(
error
==
GIT_ENOTFOUND
&&
!*
out
)
*
out
=
ref
;
else
git_reference_free
(
ref
);
}
}
return
error
;
...
...
src/repository.c
View file @
78db0239
...
...
@@ -133,7 +133,9 @@ void git_repository_free(git_repository *repo)
for
(
i
=
0
;
i
<
repo
->
reserved_names
.
size
;
i
++
)
git_buf_free
(
git_array_get
(
repo
->
reserved_names
,
i
));
git_array_clear
(
repo
->
reserved_names
);
git__free
(
repo
->
path_gitlink
);
git__free
(
repo
->
path_repository
);
git__free
(
repo
->
workdir
);
git__free
(
repo
->
namespace
);
...
...
tests/filter/file.c
View file @
78db0239
...
...
@@ -64,6 +64,7 @@ int buf_writestream_write(git_writestream *s, const char *buf, size_t len)
int
buf_writestream_close
(
git_writestream
*
s
)
{
GIT_UNUSED
(
s
);
return
0
;
}
...
...
@@ -94,4 +95,5 @@ void test_filter_file__apply_stream(void)
cl_assert_equal_s
(
"crlf
\n
crlf
\n
crlf
\n
crlf
\n
"
,
write_target
.
buf
.
ptr
);
git_filter_list_free
(
fl
);
write_target
.
base
.
free
((
struct
git_writestream
*
)
&
write_target
);
}
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