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
05c24c44
Unverified
Commit
05c24c44
authored
7 years ago
by
Edward Thomson
Committed by
GitHub
7 years ago
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #4527 from pks-t/pks/resource-leaks
Plug resource leaks
parents
028a2806
178fda8a
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
2 deletions
+6
-2
src/hash/hash_win32.c
+1
-1
src/odb.c
+2
-0
src/odb_loose.c
+3
-1
No files found.
src/hash/hash_win32.c
View file @
05c24c44
...
...
@@ -57,7 +57,7 @@ GIT_INLINE(int) hash_cng_prov_init(void)
if
(
hash_prov
.
prov
.
cng
.
open_algorithm_provider
(
&
hash_prov
.
prov
.
cng
.
handle
,
GIT_HASH_CNG_HASH_TYPE
,
NULL
,
GIT_HASH_CNG_HASH_REUSABLE
)
<
0
)
{
FreeLibrary
(
hash_prov
.
prov
.
cng
.
dll
);
giterr_set
(
GITERR_OS
"algorithm provider could not be initialized"
);
giterr_set
(
GITERR_OS
,
"algorithm provider could not be initialized"
);
return
-
1
;
}
...
...
This diff is collapsed.
Click to expand it.
src/odb.c
View file @
05c24c44
...
...
@@ -1373,6 +1373,8 @@ int git_odb_open_wstream(
(
*
stream
)
->
received_bytes
=
0
;
done:
if
(
error
)
git__free
(
ctx
);
return
error
;
}
...
...
This diff is collapsed.
Click to expand it.
src/odb_loose.c
View file @
05c24c44
...
...
@@ -433,7 +433,8 @@ static int read_header_loose(git_rawobj *out, git_buf *loc)
}
done:
p_close
(
fd
);
if
(
fd
>=
0
)
p_close
(
fd
);
return
error
;
}
...
...
@@ -1030,6 +1031,7 @@ done:
git_futils_mmap_free
(
&
stream
->
map
);
git_zstream_free
(
&
stream
->
zstream
);
git_hash_ctx_cleanup
(
hash_ctx
);
git__free
(
hash_ctx
);
git__free
(
stream
);
}
...
...
This diff is collapsed.
Click to expand it.
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