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
0cd162be
Commit
0cd162be
authored
Nov 15, 2016
by
Carlos Martín Nieto
Committed by
GitHub
Nov 15, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #4008 from pks-t/pks/sortedcache-fd-leak
sortedcache: plug leaked file descriptor
parents
1db3035d
613381fc
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
1 deletions
+4
-1
src/patch_parse.c
+3
-1
src/sortedcache.c
+1
-0
No files found.
src/patch_parse.c
View file @
0cd162be
...
...
@@ -1014,8 +1014,10 @@ git_patch_parse_ctx *git_patch_parse_ctx_init(
return
NULL
;
if
(
content_len
)
{
if
((
ctx
->
content
=
git__malloc
(
content_len
))
==
NULL
)
if
((
ctx
->
content
=
git__malloc
(
content_len
))
==
NULL
)
{
git__free
(
ctx
);
return
NULL
;
}
memcpy
((
char
*
)
ctx
->
content
,
content
,
content_len
);
}
...
...
src/sortedcache.c
View file @
0cd162be
...
...
@@ -216,6 +216,7 @@ int git_sortedcache_lockandload(git_sortedcache *sc, git_buf *buf)
if
(
p_fstat
(
fd
,
&
st
)
<
0
)
{
giterr_set
(
GITERR_OS
,
"failed to stat file"
);
error
=
-
1
;
(
void
)
p_close
(
fd
);
goto
unlock
;
}
...
...
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