Skip to content

Commit d2ae751

Browse files
committed
Merge branch 'sb/plug-streaming-leak'
* sb/plug-streaming-leak: streaming.c: fix a memleak
2 parents 0cb7054 + 9ce4ad3 commit d2ae751

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

streaming.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -507,8 +507,11 @@ int stream_blob_to_fd(int fd, unsigned const char *sha1, struct stream_filter *f
507507
int result = -1;
508508

509509
st = open_istream(sha1, &type, &sz, filter);
510-
if (!st)
510+
if (!st) {
511+
if (filter)
512+
free_stream_filter(filter);
511513
return result;
514+
}
512515
if (type != OBJ_BLOB)
513516
goto close_and_exit;
514517
for (;;) {

0 commit comments

Comments
 (0)