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
5c5df666
Commit
5c5df666
authored
Sep 27, 2015
by
Carlos Martín Nieto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Plug some leaks
parent
a8d0b4de
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
0 deletions
+10
-0
src/submodule.c
+3
-0
tests/core/mkdir.c
+2
-0
tests/index/rename.c
+5
-0
No files found.
src/submodule.c
View file @
5c5df666
...
@@ -229,6 +229,7 @@ int git_submodule_lookup(
...
@@ -229,6 +229,7 @@ int git_submodule_lookup(
if
(
error
<
0
)
{
if
(
error
<
0
)
{
git_submodule_free
(
sm
);
git_submodule_free
(
sm
);
git_buf_free
(
&
path
);
return
error
;
return
error
;
}
}
...
@@ -1699,6 +1700,8 @@ static int submodule_read_config(git_submodule *sm, git_config *cfg)
...
@@ -1699,6 +1700,8 @@ static int submodule_read_config(git_submodule *sm, git_config *cfg)
* should be strcasecmp
* should be strcasecmp
*/
*/
if
(
strcmp
(
sm
->
name
,
value
)
!=
0
)
{
if
(
strcmp
(
sm
->
name
,
value
)
!=
0
)
{
if
(
sm
->
path
!=
sm
->
name
)
git__free
(
sm
->
path
);
sm
->
path
=
git__strdup
(
value
);
sm
->
path
=
git__strdup
(
value
);
GITERR_CHECK_ALLOC
(
sm
->
path
);
GITERR_CHECK_ALLOC
(
sm
->
path
);
}
}
...
...
tests/core/mkdir.c
View file @
5c5df666
...
@@ -48,6 +48,8 @@ void test_core_mkdir__absolute(void)
...
@@ -48,6 +48,8 @@ void test_core_mkdir__absolute(void)
cl_assert
(
!
git_path_isdir
(
path
.
ptr
));
cl_assert
(
!
git_path_isdir
(
path
.
ptr
));
cl_git_fail
(
git_futils_mkdir
(
path
.
ptr
,
0755
,
0
));
cl_git_fail
(
git_futils_mkdir
(
path
.
ptr
,
0755
,
0
));
cl_assert
(
!
git_path_isdir
(
path
.
ptr
));
cl_assert
(
!
git_path_isdir
(
path
.
ptr
));
git_buf_free
(
&
path
);
}
}
void
test_core_mkdir__basic
(
void
)
void
test_core_mkdir__basic
(
void
)
...
...
tests/index/rename.c
View file @
5c5df666
...
@@ -77,5 +77,10 @@ void test_index_rename__casechanging(void)
...
@@ -77,5 +77,10 @@ void test_index_rename__casechanging(void)
cl_assert_equal_i
(
1
,
git_index_entrycount
(
index
));
cl_assert_equal_i
(
1
,
git_index_entrycount
(
index
));
else
else
cl_assert_equal_i
(
2
,
git_index_entrycount
(
index
));
cl_assert_equal_i
(
2
,
git_index_entrycount
(
index
));
git_index_free
(
index
);
git_repository_free
(
repo
);
cl_fixture_cleanup
(
"rename"
);
}
}
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