aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/rpc/bootstrap_daemon.cpp2
-rw-r--r--src/rpc/bootstrap_daemon.h2
-rw-r--r--src/wallet/wallet2.cpp6
3 files changed, 8 insertions, 2 deletions
diff --git a/src/rpc/bootstrap_daemon.cpp b/src/rpc/bootstrap_daemon.cpp
index 6f8426ee7..c97b2c95a 100644
--- a/src/rpc/bootstrap_daemon.cpp
+++ b/src/rpc/bootstrap_daemon.cpp
@@ -12,7 +12,7 @@
namespace cryptonote
{
- bootstrap_daemon::bootstrap_daemon(std::function<boost::optional<std::string>()> get_next_public_node) noexcept
+ bootstrap_daemon::bootstrap_daemon(std::function<boost::optional<std::string>()> get_next_public_node)
: m_get_next_public_node(get_next_public_node)
{
}
diff --git a/src/rpc/bootstrap_daemon.h b/src/rpc/bootstrap_daemon.h
index 130a6458d..6276b1b21 100644
--- a/src/rpc/bootstrap_daemon.h
+++ b/src/rpc/bootstrap_daemon.h
@@ -15,7 +15,7 @@ namespace cryptonote
class bootstrap_daemon
{
public:
- bootstrap_daemon(std::function<boost::optional<std::string>()> get_next_public_node) noexcept;
+ bootstrap_daemon(std::function<boost::optional<std::string>()> get_next_public_node);
bootstrap_daemon(const std::string &address, const boost::optional<epee::net_utils::http::login> &credentials);
std::string address() const noexcept;
diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp
index b85e805de..3e00369a8 100644
--- a/src/wallet/wallet2.cpp
+++ b/src/wallet/wallet2.cpp
@@ -13195,6 +13195,12 @@ bool wallet2::save_to_file(const std::string& path_to_file, const std::string& r
}
FILE *fp = fopen(path_to_file.c_str(), "w+");
+ if (!fp)
+ {
+ MERROR("Failed to open wallet file for writing: " << path_to_file << ": " << strerror(errno));
+ return false;
+ }
+
// Save the result b/c we need to close the fp before returning success/failure.
int write_result = PEM_write(fp, ASCII_OUTPUT_MAGIC.c_str(), "", (const unsigned char *) raw.c_str(), raw.length());
fclose(fp);