Hugh McMaster : regedit: Free temporary buffer when working with REG_DWORD and REG_QWORD values.
Alexandre Julliard
julliard at winehq.org
Tue Jul 26 15:40:52 CDT 2022
Module: wine
Branch: master
Commit: 57f45013d82280e9dabdb754ab638c2c817577de
URL: https://gitlab.winehq.org/wine/wine/-/commit/57f45013d82280e9dabdb754ab638c2c817577de
Author: Hugh McMaster <hugh.mcmaster at outlook.com>
Date: Tue Jul 26 12:19:43 2022 +1000
regedit: Free temporary buffer when working with REG_DWORD and REG_QWORD values.
---
programs/regedit/edit.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/programs/regedit/edit.c b/programs/regedit/edit.c
index 537bcbd4541..20a0c32adda 100644
--- a/programs/regedit/edit.c
+++ b/programs/regedit/edit.c
@@ -104,11 +104,13 @@ static BOOL update_registry_value(HWND hwndDlg, struct edit_params *params)
params->size = sizeof(DWORD);
params->data = malloc(params->size);
swscanf(buf, isDecimal ? L"%lu" : L"%lx", params->data);
+ free(buf);
break;
case REG_QWORD:
params->size = sizeof(UINT64);
params->data = malloc(params->size);
swscanf(buf, isDecimal ? L"%I64u" : L"%I64x", params->data);
+ free(buf);
break;
case REG_MULTI_SZ:
{
More information about the wine-cvs
mailing list