summaryrefslogtreecommitdiff
path: root/src/saveload
diff options
context:
space:
mode:
Diffstat (limited to 'src/saveload')
-rw-r--r--src/saveload/order_sl.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/saveload/order_sl.cpp b/src/saveload/order_sl.cpp
index d93974234..ba1f79c38 100644
--- a/src/saveload/order_sl.cpp
+++ b/src/saveload/order_sl.cpp
@@ -302,7 +302,12 @@ void Load_BKOR()
* Furthermore before savegame version 192 the actual content was always corrupt.
*/
if (!_networking || _network_server || IsSavegameVersionBefore(192)) {
- _order_backup_pool.CleanPool();
+ /* Note: We cannot use CleanPool since that skips part of the destructor
+ * and then leaks un-reachable Orders in the order pool. */
+ OrderBackup *ob;
+ FOR_ALL_ORDER_BACKUPS(ob) {
+ delete ob;
+ }
}
}