Skip to content

Commit

Permalink
Fix use-after-free
Browse files Browse the repository at this point in the history
  • Loading branch information
IonAgorria committed Apr 11, 2024
1 parent e44ffea commit 76eb61b
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 3 deletions.
1 change: 0 additions & 1 deletion Source/Network/ServerList.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,6 @@ void ServerList::fetchRelayHostInfoList() {

void ServerList::refreshHostInfoList() {
if (!findingHosts || !listNeedUpdate) return;
MTG();
listNeedUpdate = false;
gameInfoList.clear();
for (auto& host : lastRelayGameInfoList) {
Expand Down
2 changes: 1 addition & 1 deletion Source/XTool/xerrhand.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,7 @@ void XErrorHandler::Abort(const char* message, int code, int val, const char* su

//Assemble text
std::ostringstream stream;
if (prefix) {
if (!prefix.empty()) {
stream << prefix << std::endl;
}
stream << "Error ocurred! Code: " << code << " Val: " << val << std::endl;
Expand Down
2 changes: 1 addition & 1 deletion Source/XTool/xerrhand.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ struct XErrorHandler
{
unsigned state;

const char* prefix;
std::string prefix;

std::string log_path;

Expand Down

0 comments on commit 76eb61b

Please sign in to comment.