aboutsummaryrefslogtreecommitdiff
path: root/src/common/linux
diff options
context:
space:
mode:
authorthestig@chromium.org <thestig@chromium.org@4c0a9323-5329-0410-9bdc-e9ce6186880e>2014-04-01 20:18:23 +0000
committerthestig@chromium.org <thestig@chromium.org@4c0a9323-5329-0410-9bdc-e9ce6186880e>2014-04-01 20:18:23 +0000
commit482df94a076914e21d369f9331cffabf2120cf7a (patch)
treecf2d268a4720b9c7ac205a92e1d81be027b8aa15 /src/common/linux
parentMake ARM64 detection consistent in chromium. (diff)
downloadbreakpad-482df94a076914e21d369f9331cffabf2120cf7a.tar.xz
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
Diffstat (limited to 'src/common/linux')
-rw-r--r--src/common/linux/google_crashdump_uploader.cc2
-rw-r--r--src/common/linux/google_crashdump_uploader.h3
2 files changed, 3 insertions, 2 deletions
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 <string>
#include <map>
+#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<LibcurlWrapper> http_layer_;
string product_;
string version_;
string guid_;