From 67b0a17faa5240ee924cd90f496a412339d00356 Mon Sep 17 00:00:00 2001 From: Mihai Moldovan Date: Fri, 30 Jun 2017 22:42:25 +0200 Subject: nxcomp/Log.h: delete stream_ member before class object destruction. --- nxcomp/src/Log.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/nxcomp/src/Log.h b/nxcomp/src/Log.h index 32779bcaa..44c43a47b 100644 --- a/nxcomp/src/Log.h +++ b/nxcomp/src/Log.h @@ -249,6 +249,10 @@ class NXLog free_thread_data(pdt); pthread_key_delete(tls_key_); + + if ((stream_) && (stream_ != &std::cerr)) { + delete stream_; + } } /** Minimum severity level to output */ -- cgit v1.2.3