diff --git a/Foundation/include/Poco/BufferedStreamBuf.h b/Foundation/include/Poco/BufferedStreamBuf.h index 8817005dd..31b960464 100644 --- a/Foundation/include/Poco/BufferedStreamBuf.h +++ b/Foundation/include/Poco/BufferedStreamBuf.h @@ -67,7 +67,13 @@ public: ~BasicBufferedStreamBuf() { - Allocator::deallocate(_pBuffer, _bufsize); + try + { + Allocator::deallocate(_pBuffer, _bufsize); + } catch (...) + { + poco_unexpected(); + } } virtual int_type overflow(int_type c)