Bugfix: Free up memory in httphelper.
authorBjoern Sikora <bjoern.sikora@intra2net.com>
Tue, 15 Sep 2009 15:28:23 +0000 (17:28 +0200)
committerBjoern Sikora <bjoern.sikora@intra2net.com>
Tue, 15 Sep 2009 15:28:23 +0000 (17:28 +0200)
Bugfix: Init ProxyPort in config.cpp.

src/config.cpp
src/httphelper.cpp

index a8635f8..d1cee9f 100644 (file)
@@ -46,6 +46,7 @@ Config::Config(Logger::Ptr _log, Serviceholder::Ptr _serviceholder)
     , EnableIPv6(false)
     , Loglevel(0)
     , ConfigPath("/etc/bpdyndnsd")
+    , ProxyPort(0)
     , ExternalWarningLog("")
     , ExternalWarningLevel(0)
 {
index f3feefd..18aec0a 100644 (file)
@@ -9,15 +9,6 @@
 
 #include "httphelper.h"
 
-/**
- * Default Constructor
- */
-HTTPHelper::HTTPHelper()
-    : Log(new Logger)
-    , ProxyPort(0)
-{
-}
-
 
 /**
  * Constructor. Use this constructor if HTTP AUTH should be used. Username and password will then be set as HTTP auth options.
@@ -57,6 +48,9 @@ HTTPHelper::HTTPHelper(Logger::Ptr _log, const string& _proxy, const int _proxy_
  */
 HTTPHelper::~HTTPHelper()
 {
+    // Free memory
+    curl_easy_cleanup(CurlEasyHandle);
+    free(CurlErrBuff);
 }