diff --git a/renderdoc/os/win32/win32_stringio.cpp b/renderdoc/os/win32/win32_stringio.cpp index 348365137..3852cbe9f 100644 --- a/renderdoc/os/win32/win32_stringio.cpp +++ b/renderdoc/os/win32/win32_stringio.cpp @@ -282,6 +282,8 @@ namespace StringFormat string result = StringFormat::Wide2UTF8(wstring(buf)); + delete[] buf; + if(result.length()+1 < bufSize) { memcpy(str, result.c_str(), result.length());