mirror of https://github.com/OpenTTD/OpenTTD.git
(svn r26161) -Fix [FS#5830] (r22567) (r25956-ish): Backup data of altered persistent storage arrays was freed twice.
This commit is contained in:
parent
e595720085
commit
3d53c0f7b9
|
@ -198,14 +198,6 @@ struct PersistentStorage : PersistentStorageArray<int32, 16>, PersistentStorageP
|
||||||
/** We don't want GCC to zero our struct! It already is zeroed and has an index! */
|
/** We don't want GCC to zero our struct! It already is zeroed and has an index! */
|
||||||
PersistentStorage(const uint32 new_grfid) : grfid(new_grfid)
|
PersistentStorage(const uint32 new_grfid) : grfid(new_grfid)
|
||||||
{
|
{
|
||||||
this->prev_storage = NULL;
|
|
||||||
memset(this->storage, 0, sizeof(this->storage));
|
|
||||||
}
|
|
||||||
|
|
||||||
/** Free the memory used by the persistent storage. */
|
|
||||||
~PersistentStorage()
|
|
||||||
{
|
|
||||||
free(this->prev_storage);
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue