Free memory allocated with malloc()
This commit is contained in:
3
main.cpp
3
main.cpp
@@ -312,7 +312,7 @@ int main(int argc, char** argv) {
|
||||
display_and_exit_raygui(std::string(inv.what()) + "\nClosing game...", 2);
|
||||
return -1;
|
||||
}
|
||||
free(code_text);
|
||||
free(code_text);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -392,6 +392,7 @@ int main(int argc, char** argv) {
|
||||
/* If the response is NULL, that means it timed-out. In this case, there's no value to print */
|
||||
std::cout << "NOTHING RECEIVED" << std::endl;
|
||||
}
|
||||
free(response_array);
|
||||
}
|
||||
|
||||
/* Check to see if peer has quit the game */
|
||||
|
Reference in New Issue
Block a user