Browse Source

testmouse: avoid use-after-free

Bug was introduced in 17a891daa86d226e071a17ff34dc90c146c5d307
Anonymous Maarten 3 weeks ago
parent
commit
8f21fe4994
1 changed files with 1 additions and 1 deletions
  1. 1 1
      test/testmouse.c

+ 1 - 1
test/testmouse.c

@@ -347,7 +347,7 @@ int main(int argc, char *argv[])
 
     while (active) {
         Object *next = active->next;
-        SDL_free(next);
+        SDL_free(active);
         active = next;
     }
     SDL_DestroyRenderer(loop_data.renderer);