summaryrefslogtreecommitdiff
path: root/streaming.c
diff options
context:
space:
mode:
Diffstat (limited to 'streaming.c')
-rw-r--r--streaming.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/streaming.c b/streaming.c
index 2ff036a..811fcc2 100644
--- a/streaming.c
+++ b/streaming.c
@@ -507,8 +507,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 (;;) {