Andrew's git
/
gitweb.git
/ blobdiff
summary
|
log
|
commit
|
diff
|
tree
commit
grep
author
committer
pickaxe
?
re
streaming.c: fix a memleak
[gitweb.git]
/
streaming.c
diff --git
a/streaming.c
b/streaming.c
index 7e7ee2be6fe147ff660f8ab25618fbe4d4d0f11c..c4d421d5990b03c9b510d4f8ae4e4a25c414a275 100644
(file)
--- a/
streaming.c
+++ b/
streaming.c
@@
-505,8
+505,11
@@
int stream_blob_to_fd(int fd, unsigned const char *sha1, struct stream_filter *f
int result = -1;
st = open_istream(sha1, &type, &sz, filter);
- if (!st)
+ if (!st) {
+ if (filter)
+ free_stream_filter(filter);
return result;
+ }
if (type != OBJ_BLOB)
goto close_and_exit;
for (;;) {