Hugh McMaster : regedit: Free the stringValueData buffer before using it again (Coverity).

Alexandre Julliard julliard at winehq.org
Thu Jun 15 15:34:19 CDT 2017


Module: wine
Branch: master
Commit: b1e48fb469c8bba38716b85a49965deefb79ec5f
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=b1e48fb469c8bba38716b85a49965deefb79ec5f

Author: Hugh McMaster <hugh.mcmaster at outlook.com>
Date:   Thu Jun 15 11:58:54 2017 +0000

regedit: Free the stringValueData buffer before using it again (Coverity).

Signed-off-by: Hugh McMaster <hugh.mcmaster at outlook.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 programs/regedit/edit.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/programs/regedit/edit.c b/programs/regedit/edit.c
index fcf2a60..d88061c 100644
--- a/programs/regedit/edit.c
+++ b/programs/regedit/edit.c
@@ -378,6 +378,7 @@ BOOL ModifyValue(HWND hwnd, HKEY hKeyRoot, LPCWSTR keyPath, LPCWSTR valueName)
     {
         int index = SendMessageW(g_pChildWnd->hListWnd, LVM_GETNEXTITEM, -1,
                                  MAKELPARAM(LVNI_FOCUSED | LVNI_SELECTED, 0));
+        HeapFree(GetProcessHeap(), 0, stringValueData);
         stringValueData = read_value(hwnd, hKey, valueName, &type, &len);
         format_value_data(g_pChildWnd->hListWnd, index, type, stringValueData, len);
     }




More information about the wine-cvs mailing list