diff --git a/src/l4/pkg/pong/include/logging.h b/src/l4/pkg/pong/include/logging.h index ad005288..0cc5f53d 100644 --- a/src/l4/pkg/pong/include/logging.h +++ b/src/l4/pkg/pong/include/logging.h @@ -51,7 +51,7 @@ redirect_to_log(std::ostream &os) { // The basic_ios interface expectes a raw pointer... auto buf = new Log_Buffer(256); - auto old_buf = os.rdbuf(buf); - // I guess we should delete this here? - delete old_buf; + os.rdbuf(buf); + // We should not free the old buffer because it has not been allocated + // dynamically. }