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
da820437
Commit
da820437
authored
Nov 30, 2012
by
Carlos Martín Nieto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
graph: plug leak
parent
2d6aedbf
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
+7
-2
src/graph.c
+7
-2
No files found.
src/graph.c
View file @
da820437
...
...
@@ -22,9 +22,9 @@ static int ahead_behind(git_commit_list_node *one, git_commit_list_node *two,
if
(
git_pqueue_init
(
&
pq
,
2
,
git_commit_list_time_cmp
)
<
0
)
return
-
1
;
if
(
git_pqueue_insert
(
&
pq
,
one
)
<
0
)
return
-
1
;
goto
on_error
;
if
(
git_pqueue_insert
(
&
pq
,
two
)
<
0
)
return
-
1
;
goto
on_error
;
while
((
commit
=
git_pqueue_pop
(
&
pq
))
!=
NULL
)
{
if
(
commit
->
flags
&
RESULT
||
...
...
@@ -43,7 +43,12 @@ static int ahead_behind(git_commit_list_node *one, git_commit_list_node *two,
commit
->
flags
|=
RESULT
;
}
git_pqueue_free
(
&
pq
);
return
0
;
on_error:
git_pqueue_free
(
&
pq
);
return
-
1
;
}
int
git_graph_ahead_behind
(
size_t
*
ahead
,
size_t
*
behind
,
git_repository
*
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