tor/changes/ticket30176
Tobias Stoeckmann 670d0f9f5b Clear memory in smartlist_remove_keeporder.
The smartlist functions take great care to reset unused pointers inside
the smartlist memory to NULL.

The function smartlist_remove_keeporder does not clear memory in such
way when elements have been removed. Therefore call memset after the
for-loop that removes elements. If no element is removed, it is
effectively a no-op.

Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
2019-04-15 14:51:36 -04:00

5 lines
231 B
Plaintext

o Minor features (defense in depth):
- In smartlist_remove_keeporder(), set any pointers that become
unused to NULL, in case a bug causes them to be used later. Closes
ticket 30176. Patch from Tobias Stoeckmann.