mirror of
https://github.com/yquake2/yquake2remaster.git
synced 2025-02-08 16:52:10 +00:00
Fix memory use after free detected by ASAN
This commit is contained in:
parent
701defd4ad
commit
446224467d
2 changed files with 4 additions and 1 deletions
|
@ -375,7 +375,7 @@ FS_PackQuickSearch(const fsPack_t *pak, const char *name)
|
||||||
int start, end;
|
int start, end;
|
||||||
|
|
||||||
start = 0;
|
start = 0;
|
||||||
end = pak->numFiles;
|
end = pak->numFiles - 1;
|
||||||
|
|
||||||
while (start <= end)
|
while (start <= end)
|
||||||
{
|
{
|
||||||
|
|
|
@ -688,6 +688,9 @@ SV_Shutdown(char *finalmsg, qboolean reconnect)
|
||||||
memset(&sv, 0, sizeof(sv));
|
memset(&sv, 0, sizeof(sv));
|
||||||
Com_SetServerState(sv.state);
|
Com_SetServerState(sv.state);
|
||||||
|
|
||||||
|
/* No old connect for sure */
|
||||||
|
sv_client = NULL;
|
||||||
|
|
||||||
/* free server static data */
|
/* free server static data */
|
||||||
if (svs.clients)
|
if (svs.clients)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue