diff --git a/libbitdht/src/udp/udplayer.cc b/libbitdht/src/udp/udplayer.cc index fe4a0163f..d21ca078c 100644 --- a/libbitdht/src/udp/udplayer.cc +++ b/libbitdht/src/udp/udplayer.cc @@ -304,6 +304,8 @@ void UdpLayer::recv_loop() #endif } } + + free(inbuf) ; return; } diff --git a/libretroshare/src/pqi/authssl.cc b/libretroshare/src/pqi/authssl.cc index e18e90e93..09f81df74 100644 --- a/libretroshare/src/pqi/authssl.cc +++ b/libretroshare/src/pqi/authssl.cc @@ -765,10 +765,17 @@ bool AuthSSLimpl::AuthX509WithGPG(X509 *x509) std::cerr << "AuthSSLimpl::AuthX509() X509 authenticated" << std::endl; #endif + OPENSSL_free(buf_in) ; + OPENSSL_free(buf_hashout) ; return true; err: std::cerr << "AuthSSLimpl::AuthX509() X509 NOT authenticated" << std::endl; + + if(buf_in != NULL) + OPENSSL_free(buf_in) ; + if(buf_hashout != NULL) + OPENSSL_free(buf_hashout) ; return false; } diff --git a/libretroshare/src/pqi/pqistore.cc b/libretroshare/src/pqi/pqistore.cc index 8002eac8e..ea7b5e8b2 100644 --- a/libretroshare/src/pqi/pqistore.cc +++ b/libretroshare/src/pqi/pqistore.cc @@ -420,6 +420,8 @@ bool pqiSSLstore::encryptedSendItems(const std::list& rsItemList) return false; offset += sizeItem; + if (!(bio_flags & BIN_FLAGS_NO_DELETE)) + delete *it; } if(sizeItems == offset) diff --git a/libretroshare/src/rsserver/rsinit.cc b/libretroshare/src/rsserver/rsinit.cc index bfb538a5d..0821e10e0 100644 --- a/libretroshare/src/rsserver/rsinit.cc +++ b/libretroshare/src/rsserver/rsinit.cc @@ -897,33 +897,33 @@ bool getAvailableAccounts(std::list &ids) std::cerr << "getAvailableAccounts()"; std::cerr << std::endl; - /* now iterate through the directory... - * directories - flags as old, - * files checked to see if they have changed. (rehashed) - */ + /* now iterate through the directory... + * directories - flags as old, + * files checked to see if they have changed. (rehashed) + */ - struct dirent *dent; - struct stat buf; - - /* check for the dir existance */ - DIR *dir = opendir(RsInitConfig::basedir.c_str()); + struct dirent *dent; + struct stat buf; + + /* check for the dir existance */ + DIR *dir = opendir(RsInitConfig::basedir.c_str()); if (!dir) { std::cerr << "Cannot Open Base Dir - No Available Accounts" << std::endl; exit(1); } - while(NULL != (dent = readdir(dir))) - { + while(NULL != (dent = readdir(dir))) + { /* check entry type */ std::string fname = dent -> d_name; std::string fullname = RsInitConfig::basedir + "/" + fname; - + if (-1 != stat(fullname.c_str(), &buf)) { - #ifdef FIM_DEBUG +#ifdef FIM_DEBUG std::cerr << "buf.st_mode: " << buf.st_mode < &ids) #endif continue; /* skipping links */ } - + #ifdef FIM_DEBUG - std::cerr << "Is Directory: " << fullname << std::endl; + std::cerr << "Is Directory: " << fullname << std::endl; #endif - /* */ - directories.push_back(fname); + /* */ + directories.push_back(fname); } } } + closedir(dir) ; for(it = directories.begin(); it != directories.end(); it++) { std::string accountdir = RsInitConfig::basedir + RsInitConfig::dirSeperator + *it; - #ifdef GPG_DEBUG - std::cerr << "getAvailableAccounts() Checking: " << *it << std::endl; - #endif +#ifdef GPG_DEBUG + std::cerr << "getAvailableAccounts() Checking: " << *it << std::endl; +#endif accountId tmpId; if (checkAccount(accountdir, tmpId)) { - #ifdef GPG_DEBUG - std::cerr << "getAvailableAccounts() Accepted: " << *it << std::endl; - #endif +#ifdef GPG_DEBUG + std::cerr << "getAvailableAccounts() Accepted: " << *it << std::endl; +#endif ids.push_back(tmpId); } } diff --git a/libretroshare/src/util/rsdir.cc b/libretroshare/src/util/rsdir.cc index 54713cf1a..887609ed5 100644 --- a/libretroshare/src/util/rsdir.cc +++ b/libretroshare/src/util/rsdir.cc @@ -526,6 +526,7 @@ bool RsDirUtil::checkCreateDirectory(const std::string& dir) std::cerr << "check_create_directory()"; std::cerr <