summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
authoreroman@chromium.org <eroman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-08 19:03:29 +0000
committereroman@chromium.org <eroman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-08 19:03:29 +0000
commit09f83fa89c9ab23b5f9623b06f1322850d21a15a (patch)
treeff4c1eb9cef0509389974905e2eacc221d4d26c4 /chrome
parent20b29783fd53c31aad7e362cbdedd5e13ac41f48 (diff)
downloadchromium_src-09f83fa89c9ab23b5f9623b06f1322850d21a15a.zip
chromium_src-09f83fa89c9ab23b5f9623b06f1322850d21a15a.tar.gz
chromium_src-09f83fa89c9ab23b5f9623b06f1322850d21a15a.tar.bz2
Fix a leak of the new location GURL by NotificationTask when doing a redirect.
The problem is scoped_ptr<ResourceRequestDetails> is used to delete an instance of ResourceRedirectDetails, however the base class's destructor is non-virtual, so ResourceRedirectDetails extra field (GURL new_url_) does not get torn down properly. Note that the blame callstacks in the bug report appear unrelated, because std::string is doing some fancy refcounting under the hood. So as GURLs get passed around, they take over the GURL::spec's memory that got allocated earlier by the network stack. BUG=http://crbug.com/10873 TEST=The "RedirectTest.*" ui tests when run on linux valgrind bots should show no leaks Review URL: http://codereview.chromium.org/155204 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20179 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r--chrome/browser/renderer_host/resource_request_details.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/chrome/browser/renderer_host/resource_request_details.h b/chrome/browser/renderer_host/resource_request_details.h
index 4209c7f..f8a5459 100644
--- a/chrome/browser/renderer_host/resource_request_details.h
+++ b/chrome/browser/renderer_host/resource_request_details.h
@@ -41,7 +41,7 @@ class ResourceRequestDetails {
filter_policy_ = info->filter_policy;
}
- ~ResourceRequestDetails() { }
+ virtual ~ResourceRequestDetails() { }
const GURL& url() const { return url_; }
const GURL& original_url() const { return original_url_; }