Commit 57f45013 authored by Hugh McMaster's avatar Hugh McMaster Committed by Alexandre Julliard

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

parent aa222ccd
......@@ -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:
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment