Commit 5eb49567 authored by roux's avatar roux

a memory allocation error fixed


git-svn-id: http://svn.eurecom.fr/openair4G/trunk@7790 818b1a75-f10b-46b9-bf7c-635c3b92a50f
parent 12652878
...@@ -101,7 +101,7 @@ void free_eNB_dlsch(LTE_eNB_DLSCH_t *dlsch) ...@@ -101,7 +101,7 @@ void free_eNB_dlsch(LTE_eNB_DLSCH_t *dlsch)
dlsch->harq_processes[i]->c[r] = NULL; dlsch->harq_processes[i]->c[r] = NULL;
} }
if (dlsch->harq_processes[i]->d[r]) { if (dlsch->harq_processes[i]->d[r]) {
free16(dlsch->harq_processes[i]->d[r],(96+3+(3*6144))); free16(dlsch->harq_processes[i]->d[r],(96+12+(3*6144)));
dlsch->harq_processes[i]->d[r] = NULL; dlsch->harq_processes[i]->d[r] = NULL;
} }
} }
...@@ -173,7 +173,7 @@ LTE_eNB_DLSCH_t *new_eNB_dlsch(unsigned char Kmimo,unsigned char Mdlharq,unsigne ...@@ -173,7 +173,7 @@ LTE_eNB_DLSCH_t *new_eNB_dlsch(unsigned char Kmimo,unsigned char Mdlharq,unsigne
for (r=0; r<MAX_NUM_DLSCH_SEGMENTS/bw_scaling; r++) { for (r=0; r<MAX_NUM_DLSCH_SEGMENTS/bw_scaling; r++) {
// account for filler in first segment and CRCs for multiple segment case // account for filler in first segment and CRCs for multiple segment case
dlsch->harq_processes[i]->c[r] = (uint8_t*)malloc16(((r==0)?8:0) + 3+ 768); dlsch->harq_processes[i]->c[r] = (uint8_t*)malloc16(((r==0)?8:0) + 3+ 768);
dlsch->harq_processes[i]->d[r] = (uint8_t*)malloc16((96+3+(3*6144))); dlsch->harq_processes[i]->d[r] = (uint8_t*)malloc16((96+12+(3*6144)));
if (dlsch->harq_processes[i]->c[r]) { if (dlsch->harq_processes[i]->c[r]) {
bzero(dlsch->harq_processes[i]->c[r],((r==0)?8:0) + 3+ 768); bzero(dlsch->harq_processes[i]->c[r],((r==0)?8:0) + 3+ 768);
} else { } else {
...@@ -181,7 +181,7 @@ LTE_eNB_DLSCH_t *new_eNB_dlsch(unsigned char Kmimo,unsigned char Mdlharq,unsigne ...@@ -181,7 +181,7 @@ LTE_eNB_DLSCH_t *new_eNB_dlsch(unsigned char Kmimo,unsigned char Mdlharq,unsigne
exit_flag=2; exit_flag=2;
} }
if (dlsch->harq_processes[i]->d[r]) { if (dlsch->harq_processes[i]->d[r]) {
bzero(dlsch->harq_processes[i]->d[r],(96+3+(3*6144))); bzero(dlsch->harq_processes[i]->d[r],(96+12+(3*6144)));
} else { } else {
msg("Can't get d\n"); msg("Can't get d\n");
exit_flag=2; exit_flag=2;
......
Markdown is supported
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