summaryrefslogtreecommitdiffstats
path: root/webkit
diff options
context:
space:
mode:
authorearthdok@chromium.org <earthdok@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-10-28 19:46:09 +0000
committerearthdok@chromium.org <earthdok@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-10-28 19:46:09 +0000
commitee3879374882843559a4b0d8e7c06b99c156bd8c (patch)
tree13d866df6c980e274f11a186a9317dae6e266ed6 /webkit
parentf26d6bd61da1fd773542d626121c9a216ad769d4 (diff)
downloadchromium_src-ee3879374882843559a4b0d8e7c06b99c156bd8c.zip
chromium_src-ee3879374882843559a4b0d8e7c06b99c156bd8c.tar.gz
chromium_src-ee3879374882843559a4b0d8e7c06b99c156bd8c.tar.bz2
Do not leak a FileSystemOperation in FileSystemOperationRunner::SyncGetPlatformPath.
BUG=312291 R=tzik@chromium.org Review URL: https://codereview.chromium.org/48743003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@231384 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit')
-rw-r--r--webkit/browser/fileapi/file_system_operation_runner.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/webkit/browser/fileapi/file_system_operation_runner.cc b/webkit/browser/fileapi/file_system_operation_runner.cc
index 5e45be5..8903187 100644
--- a/webkit/browser/fileapi/file_system_operation_runner.cc
+++ b/webkit/browser/fileapi/file_system_operation_runner.cc
@@ -494,9 +494,9 @@ base::PlatformFileError FileSystemOperationRunner::SyncGetPlatformPath(
const FileSystemURL& url,
base::FilePath* platform_path) {
base::PlatformFileError error = base::PLATFORM_FILE_OK;
- FileSystemOperation* operation =
- file_system_context_->CreateFileSystemOperation(url, &error);
- if (!operation)
+ scoped_ptr<FileSystemOperation> operation(
+ file_system_context_->CreateFileSystemOperation(url, &error));
+ if (!operation.get())
return error;
return operation->SyncGetPlatformPath(url, platform_path);
}