diff --git a/dlls/user32/tests/win.c b/dlls/user32/tests/win.c
index ffbb8d2c183452d639511e6e011d3f3ad1c5ab86..0d9d4264243f31693a62abb925cdcb225c704799 100644
--- a/dlls/user32/tests/win.c
+++ b/dlls/user32/tests/win.c
@@ -5431,4 +5431,7 @@ START_TEST(win)
 
     /* add the tests above this line */
     UnhookWindowsHookEx(hhook);
+
+    DestroyWindow(hwndMain2);
+    DestroyWindow(hwndMain);
 }