Ver Fonte

free enemy context

jblanked há 1 ano atrás
pai
commit
649f47c4b2
1 ficheiros alterados com 2 adições e 0 exclusões
  1. 2 0
      game/enemy.c

+ 2 - 0
game/enemy.c

@@ -59,6 +59,8 @@ static void enemy_generic_free(void *context)
         FURI_LOG_E("Game", "Enemy generic free: Invalid context");
         return;
     }
+    free(context);
+    context = NULL;
     if (enemy_context_generic)
     {
         free(enemy_context_generic);