From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Thu, 25 Oct 2018 12:56:57 +0300 From: Vladimir Davydov Subject: Re: [PATCH] vinyl: fix memory leak in write iterator Message-ID: <20181025095657.l5xgkjtekdqt4r3y@esperanza> References: <736abb4fa8aaba13591cdf509b180bfa21b5c87f.1540457794.git.vdavydov.dev@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <736abb4fa8aaba13591cdf509b180bfa21b5c87f.1540457794.git.vdavydov.dev@gmail.com> To: kostja@tarantool.org Cc: tarantool-patches@freelists.org List-ID: Pushed to 1.10 as trivial. On Thu, Oct 25, 2018 at 12:00:13PM +0300, Vladimir Davydov wrote: > 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); > }