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
1662158c
Commit
1662158c
authored
Jul 13, 2013
by
Vicent Martí
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1725 from libgit2/ntk/fix/leaks
Plug some memory leaks
parents
3a025b97
d6cb13d7
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
1 deletions
+3
-1
src/submodule.c
+2
-1
tests-clar/diff/pathspec.c
+1
-0
No files found.
src/submodule.c
View file @
1662158c
...
@@ -798,7 +798,7 @@ static void submodule_update_from_head_data(
...
@@ -798,7 +798,7 @@ static void submodule_update_from_head_data(
static
int
submodule_update_head
(
git_submodule
*
submodule
)
static
int
submodule_update_head
(
git_submodule
*
submodule
)
{
{
git_tree
*
head
=
NULL
;
git_tree
*
head
=
NULL
;
git_tree_entry
*
te
;
git_tree_entry
*
te
=
NULL
;
submodule
->
flags
=
submodule
->
flags
&
submodule
->
flags
=
submodule
->
flags
&
~
(
GIT_SUBMODULE_STATUS_IN_HEAD
|
~
(
GIT_SUBMODULE_STATUS_IN_HEAD
|
...
@@ -811,6 +811,7 @@ static int submodule_update_head(git_submodule *submodule)
...
@@ -811,6 +811,7 @@ static int submodule_update_head(git_submodule *submodule)
else
else
submodule_update_from_head_data
(
submodule
,
te
->
attr
,
&
te
->
oid
);
submodule_update_from_head_data
(
submodule
,
te
->
attr
,
&
te
->
oid
);
git_tree_entry_free
(
te
);
git_tree_free
(
head
);
git_tree_free
(
head
);
return
0
;
return
0
;
}
}
...
...
tests-clar/diff/pathspec.c
View file @
1662158c
...
@@ -89,4 +89,5 @@ void test_diff_pathspec__0(void)
...
@@ -89,4 +89,5 @@ void test_diff_pathspec__0(void)
git_tree_free
(
a
);
git_tree_free
(
a
);
git_tree_free
(
b
);
git_tree_free
(
b
);
git_pathspec_free
(
ps
);
}
}
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