regedit: Free temporary buffer when working with REG_DWORD and REG_QWORD values.

This commit is contained in:
Hugh McMaster 2022-07-26 12:19:43 +10:00 committed by Alexandre Julliard
parent aa222ccd32
commit 57f45013d8

View file

@ -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:
{