Commit c5936fed authored by Andreas Schmidt's avatar Andreas Schmidt
Browse files

Allocating block of correct size for decoding.

parent a0032dac
Pipeline #42 passed with stage
......@@ -191,9 +191,9 @@ void PrrtBlock_decode(PrrtBlock *block_ptr)
PrrtCoder_get_coder(&coder, n, k);
fec = calloc(n, sizeof(gf *));
fec = calloc(k, sizeof(gf *));
check_mem(fec);
for(i = 0; i < n; i++) {
for(i = 0; i < k; i++) {
fec[i] = calloc(block_ptr->largestDataLength, sizeof(gf));
}
......@@ -223,7 +223,7 @@ void PrrtBlock_decode(PrrtBlock *block_ptr)
error:
PrrtCoder_destroy(coder);
clear_list(fec, n);
clear_list(fec, k);
if(fec != NULL) {
free(fec);
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment