mirror of
https://github.com/redis/redis.git
synced 2026-04-21 03:01:35 -04:00
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)
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user