summaryrefslogtreecommitdiff
path: root/src/odb.c
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2018-02-09 17:31:50 +0000
committerPatrick Steinhardt <ps@pks.im>2018-02-09 17:31:50 +0000
commita43bcd2c5392586f987d0c3c6247e75699ba135d (patch)
tree1acc28178fc65affda99e02d86b4d574c87afab3 /src/odb.c
parent028a28066ff3aaf79767e9a5c5cc5ff6762cc4bc (diff)
downloadlibgit2-a43bcd2c5392586f987d0c3c6247e75699ba135d.tar.gz
odb: fix memory leaks due to not freeing hash context
Diffstat (limited to 'src/odb.c')
-rw-r--r--src/odb.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/odb.c b/src/odb.c
index 802c721a8..07206c1ac 100644
--- a/src/odb.c
+++ b/src/odb.c
@@ -1373,6 +1373,8 @@ int git_odb_open_wstream(
(*stream)->received_bytes = 0;
done:
+ if (error)
+ git__free(ctx);
return error;
}