diff --git a/Changelog b/Changelog index d356b0193..ba835b93a 100644 --- a/Changelog +++ b/Changelog @@ -1,6 +1,7 @@ * Unreleased - Christophe Dumez - v1.5.6 - BUGFIX: RSS feed articles can now be displayed using keyboard arrows - BUGFIX: RSS feed downloader can only process unread articles now + - BUGFIX: Fixed memory leak in RSS parser * Wed Nov 4 2009 - Christophe Dumez - v1.5.5 - BUGFIX: Fixed man page diff --git a/src/rss.cpp b/src/rss.cpp index 56e90f284..2a3bfec91 100644 --- a/src/rss.cpp +++ b/src/rss.cpp @@ -562,9 +562,13 @@ short RssStream::readDoc(const QDomDocument& doc) { else if(property.tagName() == "item") { RssItem * item = new RssItem(this, property); if(item->isValid()) { - bool already_exists = itemAlreadyExists(item->getTitle()); + QString title = item->getTitle(); + bool already_exists = itemAlreadyExists(title); if(!already_exists) { - (*this)[item->getTitle()] = item; + (*this)[title] = item; + } else { + delete item; + item = this->value(title); } if(item->has_attachment()) { has_attachments = true;