- Fixed memory leak in RSS parser

This commit is contained in:
Christophe Dumez
2009-11-14 19:46:20 +00:00
parent 14567b85bd
commit d4fe27e436
2 changed files with 7 additions and 2 deletions

View File

@@ -1,6 +1,7 @@
* Unreleased - Christophe Dumez <chris@qbittorrent.org> - v1.5.6 * Unreleased - Christophe Dumez <chris@qbittorrent.org> - v1.5.6
- BUGFIX: RSS feed articles can now be displayed using keyboard arrows - BUGFIX: RSS feed articles can now be displayed using keyboard arrows
- BUGFIX: RSS feed downloader can only process unread articles now - BUGFIX: RSS feed downloader can only process unread articles now
- BUGFIX: Fixed memory leak in RSS parser
* Wed Nov 4 2009 - Christophe Dumez <chris@qbittorrent.org> - v1.5.5 * Wed Nov 4 2009 - Christophe Dumez <chris@qbittorrent.org> - v1.5.5
- BUGFIX: Fixed man page - BUGFIX: Fixed man page

View File

@@ -562,9 +562,13 @@ short RssStream::readDoc(const QDomDocument& doc) {
else if(property.tagName() == "item") { else if(property.tagName() == "item") {
RssItem * item = new RssItem(this, property); RssItem * item = new RssItem(this, property);
if(item->isValid()) { if(item->isValid()) {
bool already_exists = itemAlreadyExists(item->getTitle()); QString title = item->getTitle();
bool already_exists = itemAlreadyExists(title);
if(!already_exists) { if(!already_exists) {
(*this)[item->getTitle()] = item; (*this)[title] = item;
} else {
delete item;
item = this->value(title);
} }
if(item->has_attachment()) { if(item->has_attachment()) {
has_attachments = true; has_attachments = true;