mirror of
https://github.com/libretro/RetroArch
synced 2025-04-01 04:20:27 +00:00
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");
|
room_data = string_split(buf, "\n");
|
||||||
|
|
||||||
|
if (netplay_room_list)
|
||||||
|
free(netplay_room_list);
|
||||||
|
|
||||||
netplay_room_count = room_data->size / 8;
|
netplay_room_count = room_data->size / 8;
|
||||||
netplay_room_list = (struct netplay_room*)malloc(sizeof(struct netplay_room) * netplay_room_count);
|
netplay_room_list = (struct netplay_room*)malloc(sizeof(struct netplay_room) * netplay_room_count);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user