From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: From: Vladimir Davydov Subject: [PATCH] vinyl: fix memory leak in write iterator Date: Thu, 25 Oct 2018 12:00:13 +0300 Message-Id: <736abb4fa8aaba13591cdf509b180bfa21b5c87f.1540457794.git.vdavydov.dev@gmail.com> To: kostja@tarantool.org Cc: tarantool-patches@freelists.org List-ID: Memory allocated for vy_write_iterator::src_heap is never freed. Fix it. The leak was introduced by commit c174c985485c ("vinyl: implement new simple write iterator"). --- https://github.com/tarantool/tarantool/commits/dv/vy-fix-memleak-in-write-iterator src/box/vy_write_iterator.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/box/vy_write_iterator.c b/src/box/vy_write_iterator.c index 1b54e539..2fa66bd7 100644 --- a/src/box/vy_write_iterator.c +++ b/src/box/vy_write_iterator.c @@ -443,6 +443,7 @@ vy_write_iterator_close(struct vy_stmt_stream *vstream) assert(vstream->iface->close == vy_write_iterator_close); struct vy_write_iterator *stream = (struct vy_write_iterator *)vstream; vy_write_iterator_stop(vstream); + vy_source_heap_destroy(&stream->src_heap); tuple_format_unref(stream->format); free(stream); } -- 2.11.0