free netplay_room_list before allocating again

This commit is contained in:
radius 2017-01-22 12:33:14 -05:00
parent 33cc168eb9
commit 5e7d9affe3

View File

@ -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);