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
9269ccce
Commit
9269ccce
authored
Jan 19, 2012
by
Carlos Martín Nieto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
diff-index: fix leak
The buffer wasn't getting freed if the last difference was a deletion.
parent
860de004
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
1 deletions
+2
-1
src/transports/http.c
+1
-1
src/tree.c
+1
-0
No files found.
src/transports/http.c
View file @
9269ccce
...
@@ -71,7 +71,7 @@ static int gen_request(git_buf *buf, const char *url, const char *host, const ch
...
@@ -71,7 +71,7 @@ static int gen_request(git_buf *buf, const char *url, const char *host, const ch
if
(
content_length
>
0
)
{
if
(
content_length
>
0
)
{
git_buf_printf
(
buf
,
"Accept: application/x-git-%s-result
\r\n
"
,
service
);
git_buf_printf
(
buf
,
"Accept: application/x-git-%s-result
\r\n
"
,
service
);
git_buf_printf
(
buf
,
"Content-Type: application/x-git-%s-request
\r\n
"
,
service
);
git_buf_printf
(
buf
,
"Content-Type: application/x-git-%s-request
\r\n
"
,
service
);
git_buf_printf
(
buf
,
"Content-Length: %"
PRIuZ
"
\r\n
"
,
content_length
);
git_buf_printf
(
buf
,
"Content-Length: %"
PRIuZ
"
\r\n
"
,
content_length
);
}
else
{
}
else
{
git_buf_puts
(
buf
,
"Accept: */*
\r\n
"
);
git_buf_puts
(
buf
,
"Accept: */*
\r\n
"
);
}
}
...
...
src/tree.c
View file @
9269ccce
...
@@ -993,6 +993,7 @@ static int diff_index_cb(const char *root, git_tree_entry *tentry, void *data)
...
@@ -993,6 +993,7 @@ static int diff_index_cb(const char *root, git_tree_entry *tentry, void *data)
if
(
!
ientry
)
{
if
(
!
ientry
)
{
error
=
signal_deletion
(
tentry
,
cbdata
->
cb
,
cbdata
->
data
);
error
=
signal_deletion
(
tentry
,
cbdata
->
cb
,
cbdata
->
data
);
git_buf_free
(
&
fn_buf
);
goto
exit
;
goto
exit
;
}
}
...
...
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