Skip to content

Commit

Permalink
Explicitly set old_image array to zero so that it is not used uniniti…
Browse files Browse the repository at this point in the history
…alized.
  • Loading branch information
HazenBabcock committed Sep 14, 2018
1 parent 9e19484 commit e1a1020
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion storm_analysis/sa_library/matched_filter.c
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,11 @@ filter *initialize(double *psf, double max_diff, int x_size, int y_size, int est
/* Check whether we are memoizing. */
if(max_diff > 0.0){
flt->max_diff = max_diff;
flt->old_image = (double *)malloc(sizeof(double)*flt->image_size);
flt->old_image = (double *)malloc(sizeof(double)*flt->image_size);

for(i=0;i<flt->image_size;i++){
flt->old_image[i] = 0;
}
}
else{
flt->max_diff = 0.0;
Expand Down

0 comments on commit e1a1020

Please sign in to comment.