summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoe Rabinoff <jrabinoff6@math.gatech.edu>2018-12-04 10:59:25 -0500
committerJoe Rabinoff <jrabinoff6@math.gatech.edu>2018-12-04 10:59:25 -0500
commit08afdb57607ca94e4b6065a2a514f3138acb75f2 (patch)
tree7b889c6b19e8a18e1792c8aef7e2c1b09c2b5dc0
parent36f807427910ac28c9278702a24b0577da944d1c (diff)
downloadlibgit2-08afdb57607ca94e4b6065a2a514f3138acb75f2.tar.gz
Removed one null check
-rw-r--r--src/odb_loose.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/odb_loose.c b/src/odb_loose.c
index 5872a25b3..32be9cf22 100644
--- a/src/odb_loose.c
+++ b/src/odb_loose.c
@@ -1028,12 +1028,11 @@ static int loose_backend__readstream(
done:
if (error < 0) {
- if(stream && stream->map.data)
+ if(stream) {
git_futils_mmap_free(&stream->map);
- if(stream)
git_zstream_free(&stream->zstream);
- if(stream)
git__free(stream);
+ }
if(hash_ctx) {
git_hash_ctx_cleanup(hash_ctx);
git__free(hash_ctx);