update buffertype after DumpBUffer

pull/3087/head
Isaac Connor 2020-11-19 16:38:49 -05:00
parent 58ccea6aa8
commit 3f1e7e793f
1 changed files with 2 additions and 1 deletions

View File

@ -64,7 +64,7 @@ inline static uint8_t* AllocBuffer(size_t p_bufsize) {
}
inline static void DumpBuffer(uint8_t* buffer, int buffertype) {
if ( buffer && buffertype != ZM_BUFTYPE_DONTFREE ) {
if ( buffer && (buffertype != ZM_BUFTYPE_DONTFREE) ) {
if ( buffertype == ZM_BUFTYPE_ZM ) {
zm_freealigned(buffer);
} else if ( buffertype == ZM_BUFTYPE_MALLOC ) {
@ -122,6 +122,7 @@ protected:
inline void DumpImgBuffer() {
DumpBuffer(buffer, buffertype);
buffertype = ZM_BUFTYPE_DONTFREE;
buffer = nullptr;
allocation = 0;
}