testmouse: avoid use-after-free

Bug was introduced in 17a891daa86d226e071a17ff34dc90c146c5d307
diff --git a/test/testmouse.c b/test/testmouse.c
index 094b763..7ddecce 100644
--- a/test/testmouse.c
+++ b/test/testmouse.c
@@ -347,7 +347,7 @@
 
     while (active) {
         Object *next = active->next;
-        SDL_free(next);
+        SDL_free(active);
         active = next;
     }
     SDL_DestroyRenderer(loop_data.renderer);