gnuastro-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gnuastro-commits] master 1e815ab 2/2: Extra freeing of BZERO corrected


From: Mohammad Akhlaghi
Subject: [gnuastro-commits] master 1e815ab 2/2: Extra freeing of BZERO corrected when reading FITS
Date: Tue, 14 Nov 2017 19:25:41 -0500 (EST)

branch: master
commit 1e815abcf3d17297ca0e4332ce11110f3982bcdd
Author: Mohammad Akhlaghi <address@hidden>
Commit: Mohammad Akhlaghi <address@hidden>

    Extra freeing of BZERO corrected when reading FITS
    
    When reading a FITS file that contained a BZERO keyword, the string would
    be freed two times (once as part of `gal_list_data_free' and afterwards,
    another time separately. The second freeing is now removed with this
    commit.
    
    This problem was reported by Raúl Infante Sainz.
---
 doc/announce-acknowledge.txt | 1 +
 lib/fits.c                   | 4 ++--
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/doc/announce-acknowledge.txt b/doc/announce-acknowledge.txt
index f7b8299..81133db 100644
--- a/doc/announce-acknowledge.txt
+++ b/doc/announce-acknowledge.txt
@@ -5,6 +5,7 @@ Leindert Boogaard
 Nicolas Bouché
 Aurélien Jarno
 Takashi Ichikawa
+Raúl Infante Sainz
 Alan Lefor
 Alejandro Serrano Borlaff
 Ole Streicher
diff --git a/lib/fits.c b/lib/fits.c
index bd1cfed..96d4c76 100644
--- a/lib/fits.c
+++ b/lib/fits.c
@@ -1491,9 +1491,9 @@ gal_fits_img_info(fitsfile *fptr, int *type, size_t 
*ndim, size_t **dsize,
     (*dsize)[i]=naxes[*ndim-1-i];
 
 
-  /* Clean up. */
+  /* Clean up. Note that bzero_str, gets freed by `gal_data_free' (which is
+     called by `gal_list_data_free'. */
   gal_list_data_free(keysll);
-  if(bzero_str) free(bzero_str);
 }
 
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]