Sfoglia il codice sorgente

free enemy context

jblanked 1 anno fa
parent
commit
649f47c4b2
1 ha cambiato i file con 2 aggiunte e 0 eliminazioni
  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);