aboutsummaryrefslogtreecommitdiff
path: root/src/mosflm.c
diff options
context:
space:
mode:
authorThomas White <taw@bitwiz.org.uk>2011-01-26 17:57:44 +0100
committerThomas White <taw@physics.org>2012-02-22 15:27:12 +0100
commite3a2807bedf1a1a9e25923ee9bc0db653c4c4033 (patch)
treec8bb22ff1ab2b38e37fa70d545c6bdcc0cf0e7b7 /src/mosflm.c
parenteb24fd94de4e5d59b691acf0b1bfd43de64d66c1 (diff)
Fix many small memory leaks
Diffstat (limited to 'src/mosflm.c')
-rw-r--r--src/mosflm.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/mosflm.c b/src/mosflm.c
index 5cd2291e..6f27eb7d 100644
--- a/src/mosflm.c
+++ b/src/mosflm.c
@@ -228,6 +228,8 @@ static void write_spt(struct image *image, const char *filename)
}
+ free(sptlines);
+
fprintf(fh,"%10.2f %10.2f %10.2f %10.2f %10.2f %10.2f\n",
-999.0,-999.0,-999.0,-999.0,-999.0,-999.0);
fclose(fh);
@@ -262,8 +264,8 @@ static void write_img(struct image *image, const char *filename)
/* Header padding */
while ( ftell(fh) < 512 ) fprintf(fh," ");
- fwrite(fh, sizeof(unsigned short int), 1, fh);
-
+ fwrite(intimage, sizeof(unsigned short int), 1, fh);
+ free(intimage);
fclose(fh);
}