summaryrefslogtreecommitdiff
path: root/src/t_stream.c
diff options
context:
space:
mode:
authorYuuoniy <linmq006@gmail.com>2022-05-22 17:15:26 +0800
committerGitHub <noreply@github.com>2022-05-22 12:15:26 +0300
commit4a7a4e42db8ff757cdf3f4a824f66426036034ef (patch)
tree38b88061621239a52ae79b0fc82b4ce846c8574c /src/t_stream.c
parent00a9d6b3147143b7ed3f208f3924ff46c31e1fd9 (diff)
downloadredis-4a7a4e42db8ff757cdf3f4a824f66426036034ef.tar.gz
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)
Diffstat (limited to 'src/t_stream.c')
-rw-r--r--src/t_stream.c2
1 files changed, 1 insertions, 1 deletions
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