[PATCH] shell32: Remove redundant NULL checks before heap_free()

Michael Stefaniuc mstefani at winehq.org
Sun Apr 1 15:20:45 CDT 2018


Signed-off-by: Michael Stefaniuc <mstefani at winehq.org>
---
 dlls/shell32/dde.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/dlls/shell32/dde.c b/dlls/shell32/dde.c
index c54fe7854f..c8b93d31f6 100644
--- a/dlls/shell32/dde.c
+++ b/dlls/shell32/dde.c
@@ -184,7 +184,7 @@ static DWORD PROGMAN_OnExecute(WCHAR *command, int argc, WCHAR **argv)
         CreateDirectoryW(path, NULL);
         ShellExecuteW(NULL, NULL, path, NULL, NULL, SW_SHOWNORMAL);
 
-        if (last_group) heap_free(last_group);
+        heap_free(last_group);
         last_group = path;
     }
     else if (!strcmpiW(command, delete_groupW))
@@ -224,7 +224,7 @@ static DWORD PROGMAN_OnExecute(WCHAR *command, int argc, WCHAR **argv)
 
         ShellExecuteW(NULL, NULL, path, NULL, NULL, SW_SHOWNORMAL);
 
-        if (last_group) heap_free(last_group);
+        heap_free(last_group);
         last_group = path;
     }
     else if (!strcmpiW(command, add_itemW))
-- 
2.14.3




More information about the wine-devel mailing list