Michael Stefaniuc : regedit: Remove redundant NULL check before heap_free( ).

Alexandre Julliard julliard at winehq.org
Tue Jan 29 15:18:17 CST 2019


Module: wine
Branch: master
Commit: 73a997c6ba14a68457beaf6f968c40d47c656b61
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=73a997c6ba14a68457beaf6f968c40d47c656b61

Author: Michael Stefaniuc <mstefani at winehq.org>
Date:   Tue Jan 29 20:38:06 2019 +0100

regedit: Remove redundant NULL check before heap_free().

Signed-off-by: Michael Stefaniuc <mstefani at winehq.org>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 programs/regedit/regproc.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/programs/regedit/regproc.c b/programs/regedit/regproc.c
index 4ef99ec..28402dc 100644
--- a/programs/regedit/regproc.c
+++ b/programs/regedit/regproc.c
@@ -731,11 +731,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 (!REGPROC_unescape_string(val_name, &p))
         goto invalid;




More information about the wine-cvs mailing list