From 707f64b85c8a1b88923617ff72bd8a4ca562f3bd Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Wed, 16 Dec 2009 15:09:55 +0100 Subject: prevent destructors from throwing exceptions; check curl_easy_init errors Signed-off-by: Denys Vlasenko --- lib/Plugins/Catcut.cpp | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'lib/Plugins/Catcut.cpp') diff --git a/lib/Plugins/Catcut.cpp b/lib/Plugins/Catcut.cpp index 35f56f2..a56015d 100644 --- a/lib/Plugins/Catcut.cpp +++ b/lib/Plugins/Catcut.cpp @@ -1,6 +1,3 @@ -#include -#include -#include #include "abrtlib.h" #include "abrt_xmlrpc.h" #include "Catcut.h" @@ -18,11 +15,7 @@ using namespace std; static int put_stream(const char *pURL, FILE* f, size_t content_length) { - CURL* curl = curl_easy_init(); - if (!curl) - { - throw CABRTException(EXCEP_PLUGIN, "put_stream: can't initialize curl library"); - } + CURL* curl = xcurl_easy_init(); /* enable uploading */ curl_easy_setopt(curl, CURLOPT_UPLOAD, 1L); /* specify target */ -- cgit