Unverified Commit 4a7a4e42 authored by Yuuoniy's avatar Yuuoniy Committed by GitHub
Browse files

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)
parent 00a9d6b3
...@@ -401,7 +401,7 @@ void streamGetEdgeID(stream *s, int first, int skip_tombstones, streamID *edge_i ...@@ -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}; streamID min_id = {0, 0}, max_id = {UINT64_MAX, UINT64_MAX};
*edge_id = first ? max_id : min_id; *edge_id = first ? max_id : min_id;
} }
streamIteratorStop(&si);
} }
/* Adds a new item into the stream 's' having the specified number of /* Adds a new item into the stream 's' having the specified number of
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment