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/integer_matrix.c | |
parent | 536d1a563e5c93cbbefb3556ea897acaf8fa70ce (diff) | |
parent | 62a2fdee1b7e69a1fe1ecb58e286866c41b6bb81 (diff) |
Merge branch 'julia'
Diffstat (limited to 'libcrystfel/src/integer_matrix.c')
-rw-r--r-- | libcrystfel/src/integer_matrix.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/libcrystfel/src/integer_matrix.c b/libcrystfel/src/integer_matrix.c index c6527d82..f7881d0a 100644 --- a/libcrystfel/src/integer_matrix.c +++ b/libcrystfel/src/integer_matrix.c @@ -62,12 +62,12 @@ IntegerMatrix *intmat_new(unsigned int rows, unsigned int cols) { IntegerMatrix *m; - m = malloc(sizeof(IntegerMatrix)); + m = cfmalloc(sizeof(IntegerMatrix)); if ( m == NULL ) return NULL; - m->v = calloc(rows*cols, sizeof(signed int)); + m->v = cfcalloc(rows*cols, sizeof(signed int)); if ( m->v == NULL ) { - free(m); + cffree(m); return NULL; } @@ -109,8 +109,8 @@ IntegerMatrix *intmat_copy(const IntegerMatrix *m) void intmat_free(IntegerMatrix *m) { if ( m == NULL ) return; - free(m->v); - free(m); + cffree(m->v); + cffree(m); } @@ -190,7 +190,7 @@ signed int *transform_indices(const IntegerMatrix *P, const signed int *hkl) signed int *ans; unsigned int j; - ans = malloc(P->rows * sizeof(signed int)); + ans = cfmalloc(P->rows * sizeof(signed int)); if ( ans == NULL ) return NULL; for ( j=0; j<P->cols; j++ ) { |