Tarantool development patches archive
 help / color / mirror / Atom feed
* [PATCH] vinyl: fix memory leak in write iterator
@ 2018-10-25  9:00 Vladimir Davydov
  2018-10-25  9:56 ` Vladimir Davydov
  0 siblings, 1 reply; 2+ messages in thread
From: Vladimir Davydov @ 2018-10-25  9:00 UTC (permalink / raw)
  To: kostja; +Cc: tarantool-patches

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-10-25  9:56 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-25  9:00 [PATCH] vinyl: fix memory leak in write iterator Vladimir Davydov
2018-10-25  9:56 ` Vladimir Davydov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox