From 32c8d5114c6879842e0d9143b849c0b0a1a03485 Mon Sep 17 00:00:00 2001 From: irungentoo Date: Mon, 5 May 2014 10:00:37 -0400 Subject: Fixed bug. --- toxcore/net_crypto.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'toxcore/net_crypto.c') diff --git a/toxcore/net_crypto.c b/toxcore/net_crypto.c index 9f8048be..0f06de0f 100644 --- a/toxcore/net_crypto.c +++ b/toxcore/net_crypto.c @@ -459,6 +459,8 @@ static int64_t read_data_beg_buffer(Packets_Array *array, Packet_Data *data) memcpy(data, array->buffer[num], sizeof(Packet_Data)); uint32_t id = array->buffer_start; ++array->buffer_start; + free(array->buffer[num]); + array->buffer[num] = NULL; return id; } -- cgit v1.2.3