summaryrefslogtreecommitdiff
path: root/src/filter.c
diff options
context:
space:
mode:
authorBen Straub <bstraub@github.com>2012-07-21 20:11:37 -0700
committerBen Straub <bstraub@github.com>2012-07-21 20:11:37 -0700
commit7cae2bcdf973c1b1eea8e139a6fd8de3b47f46ab (patch)
tree9e09b0590eaae277abca92a224469acf619a92e7 /src/filter.c
parent09a03995e00605c9b23f799673b7ccb304506e5b (diff)
downloadlibgit2-7cae2bcdf973c1b1eea8e139a6fd8de3b47f46ab.tar.gz
filter: fix memory leak
Diffstat (limited to 'src/filter.c')
-rw-r--r--src/filter.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/filter.c b/src/filter.c
index ecdc809a4..e9517a259 100644
--- a/src/filter.c
+++ b/src/filter.c
@@ -171,7 +171,10 @@ static int unfiltered_blob_contents(git_buf *out, git_repository *repo, const gi
git_blob *blob;
if (!(retcode = git_blob_lookup(&blob, repo, blob_id)))
+ {
retcode = git_blob__getbuf(out, blob);
+ git_blob_free(blob);
+ }
return retcode;
}