Title: [92574] trunk/Source/WebKit2
Revision
92574
Author
[email protected]
Date
2011-08-07 12:42:21 -0700 (Sun, 07 Aug 2011)

Log Message

[QT] Possible Leaks WKRetainPtr<> should Adopt allocated Copy
https://bugs.webkit.org/show_bug.cgi?id=65790

Reviewed by Sam Weinig.

Fix a leak by adopting an allocation instead of retaining it.

* UIProcess/qt/qwkhistory.cpp:
(QWKHistoryItem::title):
(QWKHistoryItem::url):

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (92573 => 92574)


--- trunk/Source/WebKit2/ChangeLog	2011-08-07 13:47:56 UTC (rev 92573)
+++ trunk/Source/WebKit2/ChangeLog	2011-08-07 19:42:21 UTC (rev 92574)
@@ -1,3 +1,16 @@
+2011-08-07  Joseph Pecoraro  <[email protected]>
+
+        [QT] Possible Leaks WKRetainPtr<> should Adopt allocated Copy
+        https://bugs.webkit.org/show_bug.cgi?id=65790
+
+        Reviewed by Sam Weinig.
+
+        Fix a leak by adopting an allocation instead of retaining it.
+
+        * UIProcess/qt/qwkhistory.cpp:
+        (QWKHistoryItem::title):
+        (QWKHistoryItem::url):
+
 2011-08-06  Mark Rowe  <[email protected]>
 
         Fix a memory leak found via code inspection.

Modified: trunk/Source/WebKit2/UIProcess/qt/qwkhistory.cpp (92573 => 92574)


--- trunk/Source/WebKit2/UIProcess/qt/qwkhistory.cpp	2011-08-07 13:47:56 UTC (rev 92573)
+++ trunk/Source/WebKit2/UIProcess/qt/qwkhistory.cpp	2011-08-07 19:42:21 UTC (rev 92574)
@@ -73,7 +73,7 @@
 {
     if (!d->m_backForwardListItem)
         return QString();
-    WKRetainPtr<WKStringRef> title = WKBackForwardListItemCopyTitle(d->m_backForwardListItem.get());
+    WKRetainPtr<WKStringRef> title(AdoptWK, WKBackForwardListItemCopyTitle(d->m_backForwardListItem.get()));
     return WKStringCopyQString(title.get());
 }
 
@@ -81,7 +81,7 @@
 {
     if (!d->m_backForwardListItem)
         return QUrl();
-    WKRetainPtr<WKURLRef> url = ""
+    WKRetainPtr<WKURLRef> url(AdoptWK, WKBackForwardListItemCopyURL(d->m_backForwardListItem.get()));
     return WKURLCopyQUrl(url.get());
 }
 
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to