From 5bab75166c2beeb2d3d3aead3e508c98c73c26ed Mon Sep 17 00:00:00 2001 From: Sebastian Lackner Date: Tue, 17 Mar 2015 06:34:03 +0100 Subject: [PATCH] kernel32: Fix leak of dynamic_buffer in QueryFullProcessImageNameW (Coverity). --- dlls/kernel32/process.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/kernel32/process.c b/dlls/kernel32/process.c index 199b2f3e449..2c8074b9096 100644 --- a/dlls/kernel32/process.c +++ b/dlls/kernel32/process.c @@ -3568,8 +3568,8 @@ BOOL WINAPI QueryFullProcessImageNameW(HANDLE hProcess, DWORD dwFlags, LPWSTR lp ntlen = devlen + (result->Length/sizeof(WCHAR) - 2); if (ntlen + 1 > *pdwSize) { - SetLastError(ERROR_INSUFFICIENT_BUFFER); - return FALSE; + status = STATUS_BUFFER_TOO_SMALL; + goto cleanup; } *pdwSize = ntlen;