mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Don't free stringargs during deep copy
spawnsectors is memcpy'd over just before the calls to copy_stringarg, resulting in copy_stringarg Z_Free'ing the exact string it is about to copy. This is a silent memory error, as the malloc block appears to still be in a virtual-allocated page after the call to Z_Free. deepcopy is not able to properly free the target array's tree of objects if the target already exists, so that will need future work.
This commit is contained in:
parent
44131bb9a7
commit
47487b7610
1 changed files with 0 additions and 5 deletions
|
|
@ -142,11 +142,6 @@ static void copy_stringarg(char **target, const char *source)
|
|||
// on how it is copied over instead of just
|
||||
// using strcpy or smth
|
||||
|
||||
if (*target != nullptr)
|
||||
{
|
||||
Z_Free(*target);
|
||||
}
|
||||
|
||||
size_t len = 0;
|
||||
if (source != nullptr)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue