Fixed memory leak in logger_stdout

This commit is contained in:
Ismael Gomez 2018-02-17 21:37:48 +01:00
parent efd916bb62
commit f8303acba7
1 changed files with 4 additions and 1 deletions

View File

@ -42,7 +42,10 @@ namespace srslte {
{
public:
void log(std::string *msg) {
fprintf(stdout, "%s", msg->c_str());
if (msg) {
fprintf(stdout, "%s", msg->c_str());
delete msg;
}
}
};