Hugh McMaster : regedit: Free the binary data buffer after saving the new value (Coverity).

Alexandre Julliard julliard at winehq.org
Wed Jun 28 15:10:25 CDT 2017


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

Author: Hugh McMaster <hugh.mcmaster at outlook.com>
Date:   Wed Jun 28 10:47:29 2017 +0000

regedit: Free the binary data buffer after saving the new value (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 403def4..2c47bdc 100644
--- a/programs/regedit/edit.c
+++ b/programs/regedit/edit.c
@@ -165,6 +165,7 @@ static INT_PTR CALLBACK bin_modify_dlgproc(HWND hwndDlg, UINT uMsg, WPARAM wPara
             {
                 SendDlgItemMessageW(hwndDlg, IDC_VALUE_DATA, HEM_GETDATA, (WPARAM)cbData, (LPARAM)pData);
                 lRet = RegSetValueExW(params->hKey, params->lpszValueName, 0, REG_BINARY, pData, cbData);
+                HeapFree(GetProcessHeap(), 0, pData);
             }
             else
                 lRet = ERROR_OUTOFMEMORY;




More information about the wine-cvs mailing list