From e0961ddd6e38ee7aed5c26da448b934922cafb73 Mon Sep 17 00:00:00 2001 From: Kern Sibbald Date: Fri, 4 May 2007 15:23:30 +0000 Subject: [PATCH] Free an unreleased buffer in compat code git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@4694 91ce42f0-d328-0410-95d8-f526ca767f89 --- bacula/src/win32/compat/compat.cpp | 5 +++-- bacula/technotes-2.1 | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/bacula/src/win32/compat/compat.cpp b/bacula/src/win32/compat/compat.cpp index ff808a9a87..088bc43ad6 100644 --- a/bacula/src/win32/compat/compat.cpp +++ b/bacula/src/win32/compat/compat.cpp @@ -1361,15 +1361,16 @@ win32_fputs(const char *string, FILE *stream) POOLMEM* pszBuf = get_pool_memory(PM_MESSAGE); pszBuf = check_pool_memory_size(pszBuf, dwChars+1); - dwChars = p_WideCharToMultiByte(GetConsoleOutputCP(),0,(LPCWSTR) pwszBuf,-1,pszBuf,dwChars,NULL,NULL); + dwChars = p_WideCharToMultiByte(GetConsoleOutputCP(),0,(LPCWSTR)pwszBuf,-1,pszBuf,dwChars,NULL,NULL); free_pool_memory(pwszBuf); if (WriteConsoleA (hOut, pszBuf, dwChars-1, &dwCharsWritten, NULL)) { free_pool_memory(pszBuf); return dwCharsWritten; } + free_pool_memory(pszBuf); } - + /* Fall back */ return fputs(string, stream); } diff --git a/bacula/technotes-2.1 b/bacula/technotes-2.1 index 715e62e304..f682b5bd60 100644 --- a/bacula/technotes-2.1 +++ b/bacula/technotes-2.1 @@ -2,6 +2,7 @@ General: 04May07 +kes Free an unreleased buffer in compat code. kes Change console Job name from *Console* to -Console- to eliminate Win32 filename problems. Put Win32 path separator when creating Console file. This fixes bug #846. -- 2.39.5