Own the fault string in xmlrpc_error_c

xmlrpc_env_set_fault frees the buffer the pointer came from.
This commit is contained in:
noctuum
2026-09-18 23:14:43 +05:00
committed by Jari Sundell
parent 1b15b7c518
commit 84a0d86f2c
+2 -2
View File
@@ -27,11 +27,11 @@ public:
virtual ~xmlrpc_error_c() throw() {}
virtual int type() const throw() { return m_type; }
virtual const char* what() const throw() { return m_msg; }
virtual const char* what() const throw() { return m_msg.c_str(); }
private:
int m_type;
const char* m_msg;
std::string m_msg;
};
torrent::Object xmlrpc_to_object(xmlrpc_env* env, xmlrpc_value* value, int call_type = 0, rpc::target_type* target = NULL, std::function<void()>* deleter = NULL);