Merge branch 'sb/plug-streaming-leak'

* sb/plug-streaming-leak:
  streaming.c: fix a memleak
This commit is contained in:
Junio C Hamano 2015-04-14 11:49:09 -07:00
commit d2ae751b1c

View File

@ -507,8 +507,11 @@ int stream_blob_to_fd(int fd, unsigned const char *sha1, struct stream_filter *f
int result = -1; int result = -1;
st = open_istream(sha1, &type, &sz, filter); st = open_istream(sha1, &type, &sz, filter);
if (!st) if (!st) {
if (filter)
free_stream_filter(filter);
return result; return result;
}
if (type != OBJ_BLOB) if (type != OBJ_BLOB)
goto close_and_exit; goto close_and_exit;
for (;;) { for (;;) {