From 482df94a076914e21d369f9331cffabf2120cf7a Mon Sep 17 00:00:00 2001 From: "thestig@chromium.org" Date: Tue, 1 Apr 2014 20:18:23 +0000 Subject: GoogleCrashdumpUploader would leak instances of LibcurlWrapper (Coverity) The GoogleCrashdumpUploader would create, but never destroy it's instance of LibcurlWrapper. BUG=574 A=cmumford@chromium.org Original code review: https://breakpad.appspot.com/1314002/ R=cmumford@chromium.org Review URL: https://breakpad.appspot.com/1344002 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1294 4c0a9323-5329-0410-9bdc-e9ce6186880e --- src/common/linux/google_crashdump_uploader.cc | 2 +- src/common/linux/google_crashdump_uploader.h | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/common/linux/google_crashdump_uploader.cc b/src/common/linux/google_crashdump_uploader.cc index b5f32c69..ea72a860 100644 --- a/src/common/linux/google_crashdump_uploader.cc +++ b/src/common/linux/google_crashdump_uploader.cc @@ -112,7 +112,7 @@ void GoogleCrashdumpUploader::Init(const string& product, ctime_ = ctime; email_ = email; comments_ = comments; - http_layer_ = http_layer; + http_layer_.reset(http_layer); crash_server_ = crash_server; proxy_host_ = proxy_host; diff --git a/src/common/linux/google_crashdump_uploader.h b/src/common/linux/google_crashdump_uploader.h index 5eef28b3..c8d8b8a3 100644 --- a/src/common/linux/google_crashdump_uploader.h +++ b/src/common/linux/google_crashdump_uploader.h @@ -31,6 +31,7 @@ #include #include +#include "common/scoped_ptr.h" #include "common/using_std_string.h" namespace google_breakpad { @@ -81,7 +82,7 @@ class GoogleCrashdumpUploader { private: bool CheckRequiredParametersArePresent(); - LibcurlWrapper* http_layer_; + scoped_ptr http_layer_; string product_; string version_; string guid_; -- cgit v1.2.1