mirror of
https://github.com/moonlight-stream/moonlight-common-c.git
synced 2025-08-18 01:15:46 +00:00
Remove unused memory allocation
This commit is contained in:
parent
e2c6104251
commit
9a7519937e
@ -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);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user