diff --git a/lib/include/srslte/common/logger_stdout.h b/lib/include/srslte/common/logger_stdout.h index 00e4ffa7a..b76faadaf 100644 --- a/lib/include/srslte/common/logger_stdout.h +++ b/lib/include/srslte/common/logger_stdout.h @@ -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; + } } };