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
91d46f8d
Commit
91d46f8d
authored
Jan 06, 2012
by
Carlos Martín Nieto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
clay tests: free resources
Trees, indices and repos need to be freed
parent
671bbdd3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
0 deletions
+4
-0
tests-clay/index/read_tree.c
+1
-0
tests-clay/object/tree/diff.c
+1
-0
tests-clay/refs/crashes.c
+2
-0
No files found.
tests-clay/index/read_tree.c
View file @
91d46f8d
...
...
@@ -34,6 +34,7 @@ void test_index_read_tree__read_write_involution(void)
/* read-tree */
git_tree_lookup
(
&
tree
,
repo
,
&
expected
);
cl_git_pass
(
git_index_read_tree
(
index
,
tree
));
git_tree_free
(
tree
);
cl_git_pass
(
git_tree_create_fromindex
(
&
tree_oid
,
index
));
cl_assert
(
git_oid_cmp
(
&
expected
,
&
tree_oid
)
==
0
);
...
...
tests-clay/object/tree/diff.c
View file @
91d46f8d
...
...
@@ -45,6 +45,7 @@ void test_object_tree_diff__cleanup(void)
{
git_tree_free
(
atree
);
git_tree_free
(
btree
);
git_index_free
(
theindex
);
git_repository_free
(
repo
);
}
...
...
tests-clay/refs/crashes.c
View file @
91d46f8d
...
...
@@ -12,4 +12,6 @@ void test_refs_crashes__double_free(void)
cl_git_pass
(
git_reference_delete
(
ref
));
/* reference is gone from disk, so reloading it will fail */
cl_must_fail
(
git_reference_reload
(
ref2
));
git_repository_free
(
repo
);
}
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