free netplay_room_list before allocating again
This commit is contained in:
parent
33cc168eb9
commit
5e7d9affe3
|
@ -3349,6 +3349,9 @@ finish:
|
|||
|
||||
room_data = string_split(buf, "\n");
|
||||
|
||||
if (netplay_room_list)
|
||||
free(netplay_room_list);
|
||||
|
||||
netplay_room_count = room_data->size / 8;
|
||||
netplay_room_list = (struct netplay_room*)malloc(sizeof(struct netplay_room) * netplay_room_count);
|
||||
|
||||
|
|
Loading…
Reference in New Issue