msvcrt/tests: Remove redundant NULL check before free(). Found by Smatch.

Michael Stefaniuc mstefani at redhat.de
Sat Nov 17 12:15:10 CST 2007


---
 dlls/msvcrt/tests/heap.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/dlls/msvcrt/tests/heap.c b/dlls/msvcrt/tests/heap.c
index e2e9a4a..afea53f 100644
--- a/dlls/msvcrt/tests/heap.c
+++ b/dlls/msvcrt/tests/heap.c
@@ -355,8 +355,7 @@ START_TEST(heap)
     mem = realloc(NULL, 0);
     ok(mem != NULL, "memory not (re)allocated for size 0\n");
 
-    if (mem)
-        free(mem);
+    free(mem);
 
     test_aligned();
 }
-- 
1.5.3.4
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20071117/a823d61b/attachment.pgp 


More information about the wine-patches mailing list