Signed-off-by: Michael Stefaniuc mstefani@winehq.org --- return PDH_INVALID_ARGUMENT if size is NULL.
dlls/pdh/pdh_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/pdh/pdh_main.c b/dlls/pdh/pdh_main.c index bc3674a28a..7ef91f1a7f 100644 --- a/dlls/pdh/pdh_main.c +++ b/dlls/pdh/pdh_main.c @@ -898,9 +898,9 @@ PDH_STATUS WINAPI PdhLookupPerfNameByIndexA( LPCSTR machine, DWORD index, LPSTR { int required = WideCharToMultiByte( CP_ACP, 0, bufferW, -1, NULL, 0, NULL, NULL );
- if (size && *size < required) ret = PDH_MORE_DATA; + if (*size < required) ret = PDH_MORE_DATA; else WideCharToMultiByte( CP_ACP, 0, bufferW, -1, buffer, required, NULL, NULL ); - if (size) *size = required; + *size = required; } heap_free( machineW ); return ret;