From 44bbdbe49d633b5067d45441e757fa5c014e7fcd Mon Sep 17 00:00:00 2001 From: Gregory Hainaut Date: Mon, 15 Aug 2016 13:18:47 +0200 Subject: [PATCH] common: use free directly instead of an Alloc(0) Easier to understand the intent. And avoid false positive in coverity --- common/include/Utilities/ScopedAlloc.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/include/Utilities/ScopedAlloc.h b/common/include/Utilities/ScopedAlloc.h index 75688916af..a772caf36d 100644 --- a/common/include/Utilities/ScopedAlloc.h +++ b/common/include/Utilities/ScopedAlloc.h @@ -184,7 +184,7 @@ public: virtual ~ScopedAlloc() throw() { - Alloc(0); + safe_free(this->m_buffer); } virtual void Alloc( size_t newsize ) @@ -232,7 +232,7 @@ public: virtual ~ScopedAlignedAlloc() throw() { - Alloc(0); + safe_aligned_free(this->m_buffer); } virtual void Alloc( size_t newsize )