mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-31 10:13:56 +00:00
regedit: Free temporary buffer when working with REG_DWORD and REG_QWORD values.
This commit is contained in:
parent
aa222ccd32
commit
57f45013d8
1 changed files with 2 additions and 0 deletions
|
@ -104,11 +104,13 @@ static BOOL update_registry_value(HWND hwndDlg, struct edit_params *params)
|
||||||
params->size = sizeof(DWORD);
|
params->size = sizeof(DWORD);
|
||||||
params->data = malloc(params->size);
|
params->data = malloc(params->size);
|
||||||
swscanf(buf, isDecimal ? L"%lu" : L"%lx", params->data);
|
swscanf(buf, isDecimal ? L"%lu" : L"%lx", params->data);
|
||||||
|
free(buf);
|
||||||
break;
|
break;
|
||||||
case REG_QWORD:
|
case REG_QWORD:
|
||||||
params->size = sizeof(UINT64);
|
params->size = sizeof(UINT64);
|
||||||
params->data = malloc(params->size);
|
params->data = malloc(params->size);
|
||||||
swscanf(buf, isDecimal ? L"%I64u" : L"%I64x", params->data);
|
swscanf(buf, isDecimal ? L"%I64u" : L"%I64x", params->data);
|
||||||
|
free(buf);
|
||||||
break;
|
break;
|
||||||
case REG_MULTI_SZ:
|
case REG_MULTI_SZ:
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue