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
d8041638
Commit
d8041638
authored
May 02, 2013
by
Edward Thomson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix some leaks
parent
42b2bcf0
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
11 additions
and
5 deletions
+11
-5
src/diff.c
+2
-1
src/index.c
+1
-0
src/transports/smart_protocol.c
+6
-0
tests-clar/commit/parse.c
+0
-4
tests-clar/submodule/status.c
+2
-0
No files found.
src/diff.c
View file @
d8041638
...
@@ -716,7 +716,7 @@ static int diff_scan_inside_untracked_dir(
...
@@ -716,7 +716,7 @@ static int diff_scan_inside_untracked_dir(
error
=
git_iterator_advance
(
&
info
->
nitem
,
info
->
new_iter
);
error
=
git_iterator_advance
(
&
info
->
nitem
,
info
->
new_iter
);
}
}
return
error
;
goto
done
;
}
}
/* look for actual untracked file */
/* look for actual untracked file */
...
@@ -747,6 +747,7 @@ static int diff_scan_inside_untracked_dir(
...
@@ -747,6 +747,7 @@ static int diff_scan_inside_untracked_dir(
break
;
break
;
}
}
done:
git_buf_free
(
&
base
);
git_buf_free
(
&
base
);
return
error
;
return
error
;
...
...
src/index.c
View file @
d8041638
...
@@ -349,6 +349,7 @@ static void index_free(git_index *index)
...
@@ -349,6 +349,7 @@ static void index_free(git_index *index)
{
{
git_index_clear
(
index
);
git_index_clear
(
index
);
git_vector_free
(
&
index
->
entries
);
git_vector_free
(
&
index
->
entries
);
git_vector_free
(
&
index
->
names
);
git_vector_free
(
&
index
->
reuc
);
git_vector_free
(
&
index
->
reuc
);
git__free
(
index
->
index_file_path
);
git__free
(
index
->
index_file_path
);
...
...
src/transports/smart_protocol.c
View file @
d8041638
...
@@ -23,10 +23,16 @@ int git_smart__store_refs(transport_smart *t, int flushes)
...
@@ -23,10 +23,16 @@ int git_smart__store_refs(transport_smart *t, int flushes)
int
error
,
flush
=
0
,
recvd
;
int
error
,
flush
=
0
,
recvd
;
const
char
*
line_end
;
const
char
*
line_end
;
git_pkt
*
pkt
;
git_pkt
*
pkt
;
git_pkt_ref
*
ref
;
size_t
i
;
/* Clear existing refs in case git_remote_connect() is called again
/* Clear existing refs in case git_remote_connect() is called again
* after git_remote_disconnect().
* after git_remote_disconnect().
*/
*/
git_vector_foreach
(
refs
,
i
,
ref
)
{
git__free
(
ref
->
head
.
name
);
git__free
(
ref
);
}
git_vector_clear
(
refs
);
git_vector_clear
(
refs
);
do
{
do
{
...
...
tests-clar/commit/parse.c
View file @
d8041638
...
@@ -386,10 +386,6 @@ This commit has a few LF at the start of the commit message";
...
@@ -386,10 +386,6 @@ This commit has a few LF at the start of the commit message";
\n
\
\n
\
This commit has a few LF at the start of the commit message"
;
This commit has a few LF at the start of the commit message"
;
commit
=
(
git_commit
*
)
git__malloc
(
sizeof
(
git_commit
));
memset
(
commit
,
0x0
,
sizeof
(
git_commit
));
commit
->
object
.
repo
=
g_repo
;
cl_git_pass
(
parse_commit
(
&
commit
,
buffer
));
cl_git_pass
(
parse_commit
(
&
commit
,
buffer
));
cl_assert_equal_s
(
message
,
git_commit_message
(
commit
));
cl_assert_equal_s
(
message
,
git_commit_message
(
commit
));
git_commit__free
(
commit
);
git_commit__free
(
commit
);
...
...
tests-clar/submodule/status.c
View file @
d8041638
...
@@ -409,4 +409,6 @@ void test_submodule_status__untracked_dirs_containing_ignored_files(void)
...
@@ -409,4 +409,6 @@ void test_submodule_status__untracked_dirs_containing_ignored_files(void)
GIT_SUBMODULE_STATUS_IN_WD
;
GIT_SUBMODULE_STATUS_IN_WD
;
cl_assert
(
status
==
expected
);
cl_assert
(
status
==
expected
);
git_buf_free
(
&
path
);
}
}
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