From 0d666de0f0baa7aca017a8a340b951fc2588db22 Mon Sep 17 00:00:00 2001 From: Zebediah Figura Date: Thu, 4 May 2023 11:32:26 -0500 Subject: [PATCH] winepulse: Avoid accessing the product name after freeing it. --- dlls/winepulse.drv/mmdevdrv.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/dlls/winepulse.drv/mmdevdrv.c b/dlls/winepulse.drv/mmdevdrv.c index c3bc02267b5..54d81b4b7e8 100644 --- a/dlls/winepulse.drv/mmdevdrv.c +++ b/dlls/winepulse.drv/mmdevdrv.c @@ -287,8 +287,13 @@ static WCHAR *get_application_name(BOOL query_app_name) } skip: + if (found) + { + name = wcsdup(productname); + free(data); + return name; + } free(data); - if (found) return wcsdup(productname); } name = wcsrchr(path, '\\'); -- 2.11.4.GIT