Fix memory leak introduced yesterday in imapx QRESYNC
Commit 0c866faf ("Fix QRESYNC protocol violation (RH #648082)) introduced a potential leak of the 'lastuid' and 'firstuid' strings. It would almost never happen, because it would require that we're selecting a folder on a QRESYNC-capable server where we *have* previously seen messages in that folder, but for some reason we don't have a record of the uidvalidity and previous modification sequence (modseq). The only time that's ever likely to happen is perhaps the first time we connect to the server after QRESYNC is enabled. But that's no excuse. Fix this by simplifying the logic. There's no point in using QRESYNC if our local cache knows of no messages in the folder *anyway*, so remove that separate check and merge the 'if (total)' part into the existing condition for actually issuing QRESYNC. Spotted by Bojan Smojver.
parent
704ca40a
Please register or sign in to comment