Skip to content

Commit a001106

Browse files
committed
Correct linting/malloc clean-up woopsie... M1P1 was overwritten.
Should fix issue #2267
1 parent 9f7cbb8 commit a001106

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

mcstas-comps/contrib/PSD_Detector.comp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -518,9 +518,8 @@ INITIALIZE
518518
FullEnergyT = E_t[nH_t-1];
519519

520520
EAT = (double *) malloc((nH_t+1)*sizeof(double));
521-
M1P1 = (double *) malloc((nH_p+1)*sizeof(double));
522-
if(!EAT || !M1P1) {
523-
fprintf(stderr, "PSD_Detector %s: malloc() failure EAT or M1P1 arrays. Exit!\n", NAME_CURRENT_COMP);
521+
if(!EAT) {
522+
fprintf(stderr, "PSD_Detector %s: malloc() failure EAT array. Exit!\n", NAME_CURRENT_COMP);
524523
exit(-1);
525524
}
526525
EAT[0] = 0;

0 commit comments

Comments
 (0)