mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-02-18 18:01:13 +00:00
[gamecode] Save new string ref in return slot
This plugs the memory leak that caused qwaq to crash after resizing the locals window a "few" times (several seconds of playing with the size).
This commit is contained in:
parent
e2d1a0f7d2
commit
58acc483fd
1 changed files with 1 additions and 0 deletions
|
@ -468,6 +468,7 @@ PR_SetReturnString (progs_t *pr, const char *s)
|
||||||
pr_strfree (pr, sr->s.string);
|
pr_strfree (pr, sr->s.string);
|
||||||
} else {
|
} else {
|
||||||
sr = new_string_ref (res);
|
sr = new_string_ref (res);
|
||||||
|
res->rs_slot->strref = sr;
|
||||||
}
|
}
|
||||||
sr->type = str_return;
|
sr->type = str_return;
|
||||||
sr->rs_slot = res->rs_slot;
|
sr->rs_slot = res->rs_slot;
|
||||||
|
|
Loading…
Reference in a new issue