diff --git a/programs/reg/import.c b/programs/reg/import.c index 779ea2863b0..3e3ad116386 100644 --- a/programs/reg/import.c +++ b/programs/reg/import.c @@ -645,11 +645,8 @@ static WCHAR *quoted_value_name_state(struct parser *parser, WCHAR *pos) { WCHAR *val_name = pos, *p; - if (parser->value_name) - { - heap_free(parser->value_name); - parser->value_name = NULL; - } + heap_free(parser->value_name); + parser->value_name = NULL; if (!unescape_string(val_name, &p)) goto invalid;