Commit 1b6d18c 1 parent a1fb0d4 commit 1b6d18c Copy full SHA for 1b6d18c
File tree 1 file changed +4
-3
lines changed
1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -1381,7 +1381,7 @@ struct Sqw_Data_struct *Sqw_readfile(
1381
1381
Sqw->compname, file, Sqw->type=='c' ? "coh" : "inc");
1382
1382
);
1383
1383
1384
- double w_file2full[ w_bins] ; /* lookup table for fast file -> Sqw_full allocation */
1384
+ double * w_file2full = malloc( w_bins*sizeof(double)) ; /* lookup table for fast file -> Sqw_full allocation */
1385
1385
1386
1386
for (index_w=0; index_w < w_bins; w_file2full[index_w++]=0);
1387
1387
@@ -1422,7 +1422,7 @@ struct Sqw_Data_struct *Sqw_readfile(
1422
1422
w_file2full[index_w] = index_w_file;
1423
1423
}
1424
1424
1425
- double q_file2full[ q_bins] ;
1425
+ double * q_file2full=malloc( q_bins*sizeof(double)) ;
1426
1426
for (index_q=0; index_q < q_bins; q_file2full[index_q++]=0);
1427
1427
1428
1428
for (index_q=0; index_q < q_bins; index_q++) {
@@ -1932,7 +1932,8 @@ struct Sqw_Data_struct *Sqw_readfile(
1932
1932
Sqw->compname, Sqw->lookup_length);
1933
1933
);
1934
1934
}
1935
-
1935
+ free(w_file2full);
1936
+ free(q_file2full);
1936
1937
return(Sqw_Data);
1937
1938
} /* end Sqw_readfile */
1938
1939
You can’t perform that action at this time.
0 commit comments