Explorar o código

check if file_json_data is allocated

jblanked hai 9 meses
pai
achega
06fee44cfc
Modificáronse 1 ficheiros con 4 adicións e 0 borrados
  1. 4 0
      game/storage.c

+ 4 - 0
game/storage.c

@@ -1105,6 +1105,10 @@ bool separate_world_data(char *id, FuriString *world_data)
     if (!file_json_data || furi_string_size(file_json_data) == 0)
     {
         FURI_LOG_E("Game", "Failed to get json data in separate_world_data");
+        if (file_json_data)
+        {
+            furi_string_free(file_json_data);
+        }
         return false;
     }