From a470ed5d4d3fc80661b46b8b964077265b8706a6 Mon Sep 17 00:00:00 2001 From: Thomas White Date: Fri, 8 Oct 2010 17:14:44 +0200 Subject: Fix potential memory leaks --- src/hdf5-file.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src') 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; -- cgit v1.2.3