Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge branch 'sb/plug-streaming-leak'
* sb/plug-streaming-leak:
  streaming.c: fix a memleak
  • Loading branch information
Junio C Hamano committed Apr 14, 2015
2 parents 0cb7054 + 9ce4ad3 commit d2ae751
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion streaming.c
Expand Up @@ -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 (;;) {
Expand Down

0 comments on commit d2ae751

Please sign in to comment.