Module: wine Branch: master Commit: 85022e50c28a6843e0e62c34509831929792af10 URL: http://source.winehq.org/git/wine.git/?a=commit;h=85022e50c28a6843e0e62c3450...
Author: Lionel Debroux lionel_debroux@yahoo.fr Date: Fri Aug 31 14:16:56 2007 +0200
setupapi: Fix memory leak (found by Smatch).
---
dlls/setupapi/query.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/dlls/setupapi/query.c b/dlls/setupapi/query.c index 04b9c4d..68193d7 100644 --- a/dlls/setupapi/query.c +++ b/dlls/setupapi/query.c @@ -241,6 +241,7 @@ BOOL WINAPI SetupQueryInfFileInformationA(PSP_INF_INFORMATION InfInformation,
if (!ReturnBuffer) { + HeapFree(GetProcessHeap(), 0, filenameW); if (ReturnBufferSize) { SetLastError(ERROR_INVALID_PARAMETER); @@ -252,6 +253,7 @@ BOOL WINAPI SetupQueryInfFileInformationA(PSP_INF_INFORMATION InfInformation,
if (size > ReturnBufferSize) { + HeapFree(GetProcessHeap(), 0, filenameW); SetLastError(ERROR_INSUFFICIENT_BUFFER); return FALSE; }