regedit: Free the value name buffer from the default value name parser state if necessary (Valgrind).

Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Hugh McMaster 2017-07-24 12:47:48 +00:00 committed by Alexandre Julliard
parent 75e9f670fa
commit b501b2388d
1 changed files with 1 additions and 0 deletions

View File

@ -699,6 +699,7 @@ static WCHAR *delete_key_state(struct parser *parser, WCHAR *pos)
/* handler for parser DEFAULT_VALUE_NAME state */
static WCHAR *default_value_name_state(struct parser *parser, WCHAR *pos)
{
HeapFree(GetProcessHeap(), 0, parser->value_name);
parser->value_name = NULL;
set_state(parser, DATA_START);