diff options
author | Thomas White <taw@physics.org> | 2024-04-18 14:32:14 +0200 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2024-04-18 14:32:14 +0200 |
commit | 52bde38abbcb53d163355a71fc9e99332ffe3dee (patch) | |
tree | 54bf334103708bcbf0b821c583b06f66769edf22 /libcrystfel/src/filters.c | |
parent | 536d1a563e5c93cbbefb3556ea897acaf8fa70ce (diff) | |
parent | 62a2fdee1b7e69a1fe1ecb58e286866c41b6bb81 (diff) |
Merge branch 'julia'
Diffstat (limited to 'libcrystfel/src/filters.c')
-rw-r--r-- | libcrystfel/src/filters.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libcrystfel/src/filters.c b/libcrystfel/src/filters.c index 4bc41f3d..e3316b1d 100644 --- a/libcrystfel/src/filters.c +++ b/libcrystfel/src/filters.c @@ -136,7 +136,7 @@ void filter_median(struct image *image, int size) nn = nn*nn; /* "localBg" is way too big, but guaranteed big enough */ - buffer = calloc(nn, sizeof(float)); + buffer = cfcalloc(nn, sizeof(float)); if ( buffer == NULL ) { ERROR("Failed to allocate LB buffer.\n"); return; @@ -153,7 +153,7 @@ void filter_median(struct image *image, int size) p = &image->detgeom->panels[pn]; - localBg = calloc(p->w*p->h, sizeof(float)); + localBg = cfcalloc(p->w*p->h, sizeof(float)); if ( localBg == NULL ) { ERROR("Failed to allocate LB buffer.\n"); return; @@ -195,8 +195,8 @@ void filter_median(struct image *image, int size) image->dp[pn][i] -= localBg[i]; } - free(localBg); + cffree(localBg); } - free(buffer); + cffree(buffer); } |