diff options
-rw-r--r-- | src/hdf5-file.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/hdf5-file.c b/src/hdf5-file.c index 485e7fb0..bcd51f99 100644 --- a/src/hdf5-file.c +++ b/src/hdf5-file.c @@ -406,6 +406,7 @@ int hdf5_read(struct hdfile *f, struct image *image, int satcorr) H5P_DEFAULT, buf); if ( r < 0 ) { ERROR("Couldn't read data\n"); + free(buf); return 1; } image->data = buf; @@ -420,6 +421,7 @@ int hdf5_read(struct hdfile *f, struct image *image, int satcorr) H5P_DEFAULT, flags); if ( r < 0 ) { ERROR("Couldn't read flags\n"); + free(flags); image->flags = NULL; } else { image->flags = flags; |