mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-02-24 20:51:35 +00:00
[net] Always allocate memory for ifaces
Pointing ifaces at myAddr doesn't end well when nq exits (free doesn't like it).
This commit is contained in:
parent
6f03b4a65f
commit
c0f4a2143f
1 changed files with 3 additions and 2 deletions
|
@ -220,9 +220,10 @@ get_iface_list (int sock)
|
|||
return 0;
|
||||
no_ifaddrs:
|
||||
#endif
|
||||
ifaces = &myAddr;
|
||||
default_iface = &ifaces[0];
|
||||
num_ifaces = 1;
|
||||
ifaces = malloc (num_ifaces * sizeof (uint32_t));
|
||||
ifaces[0] = myAddr;
|
||||
default_iface = &ifaces[0];
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue