diff options
author | Thomas White <taw@physics.org> | 2018-05-11 10:04:34 +0200 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2018-05-11 10:04:34 +0200 |
commit | 25fb665fe5e5491d8a1b54c2cdce82277b7c512d (patch) | |
tree | 9c1131c249a6b8d032b86ddc93731242836337fe /src/scaling.c | |
parent | 16b647bbef917ad5189e8439876a9a8c665c37b4 (diff) |
Fix memory leaks
Diffstat (limited to 'src/scaling.c')
-rw-r--r-- | src/scaling.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/scaling.c b/src/scaling.c index bee8e5e5..7f9b4cff 100644 --- a/src/scaling.c +++ b/src/scaling.c @@ -288,6 +288,9 @@ int scale_one_crystal(Crystal *cr, const RefList *listR, int flags) if ( n_part ) ERROR("%i subject reflection partiality\n", n_part); if ( n_nom ) ERROR("%i no match in reference list\n", n_nom); } + free(x); + free(y); + free(w); return 1; } @@ -301,6 +304,9 @@ int scale_one_crystal(Crystal *cr, const RefList *listR, int flags) if ( r ) { ERROR("Scaling failed.\n"); + free(x); + free(y); + free(w); return 1; } @@ -316,6 +322,9 @@ int scale_one_crystal(Crystal *cr, const RefList *listR, int flags) } } + free(x); + free(y); + free(w); return 1; } |