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:
Yuuoniy 2022-05-22 17:15:26 +08:00 committed by GitHub
parent 00a9d6b314
commit 4a7a4e42db
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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