From 4a7a4e42db8ff757cdf3f4a824f66426036034ef Mon Sep 17 00:00:00 2001 From: Yuuoniy Date: Sun, 22 May 2022 17:15:26 +0800 Subject: [PATCH] Fix memory leak in streamGetEdgeID (#10753) si is initialized by streamIteratorStart(), we should call streamIteratorStop() on it when done. regression introduced in #9127 (redis 7.0) --- src/t_stream.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/t_stream.c b/src/t_stream.c index e6e5da731..d3a3b9264 100644 --- a/src/t_stream.c +++ b/src/t_stream.c @@ -401,7 +401,7 @@ void streamGetEdgeID(stream *s, int first, int skip_tombstones, streamID *edge_i streamID min_id = {0, 0}, max_id = {UINT64_MAX, UINT64_MAX}; *edge_id = first ? max_id : min_id; } - + streamIteratorStop(&si); } /* Adds a new item into the stream 's' having the specified number of