فهرست منبع

testmouse: avoid use-after-free

Bug was introduced in 17a891daa86d226e071a17ff34dc90c146c5d307
Anonymous Maarten 3 هفته پیش
والد
کامیت
8f21fe4994
1فایلهای تغییر یافته به همراه1 افزوده شده و 1 حذف شده
  1. 1 1
      test/testmouse.c

+ 1 - 1
test/testmouse.c

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