Fix possible memory leak in rescanLatestTimeLine()

Started by Yugo Nagataalmost 2 years ago1 messageshackers
Jump to latest
#1Yugo Nagata
nagata@sraoss.co.jp

In rescanLatestTimeLine(), if a new target timeline is found, expectedTLEs is
replaced with newExpectedTLEs that is newly allocated by readTimeLineHistory(),
and old expectedTLEs is released using list_free_deep().

However, if the current timeline is not part of the history of the new timeline,
the function returns without using newExpectedTLEs, nor releasing it. I wonder
this is a memory leak and it is better to release it, although the affect may
be not so much.

I've attached the patch.

Regards,
Yugo Nagata

--
Yugo Nagata <nagata@sraoss.co.jp>

Attachments:

Fix_possible_memory_leak_in_rescanLatestTimeLine.patchtext/x-diff; name=Fix_possible_memory_leak_in_rescanLatestTimeLine.patchDownload+2-0