Remove unused memory allocation

This commit is contained in:
Cameron Gutman 2017-06-06 00:49:46 -07:00
parent e2c6104251
commit 9a7519937e

View File

@ -81,10 +81,9 @@ static void repairPackets(PRTP_FEC_QUEUE queue) {
reed_solomon* rs = reed_solomon_new(queue->bufferDataPackets, totalParityPackets);
int* missing = malloc(missingPackets * sizeof(int));
unsigned char** packets = malloc(totalPackets * sizeof(unsigned char*));
unsigned char* marks = malloc(totalPackets * sizeof(unsigned char));
if (rs == NULL || missing == NULL || packets == NULL || marks == NULL)
if (rs == NULL || packets == NULL || marks == NULL)
goto cleanup;
rs->shards = queue->bufferDataPackets + missingPackets; //Don't let RS complain about missing parity packets
@ -158,9 +157,6 @@ cleanup_packets:
cleanup:
reed_solomon_release(rs);
if (missing != NULL)
free(missing);
if (packets != NULL)
free(packets);