From 58a9ecf653de4ddd29c858d2662cc4e6bc87fbd7 Mon Sep 17 00:00:00 2001 From: Thomas Radke Date: Wed, 4 Oct 2000 11:20:20 -0500 Subject: [svn-r2631] Purpose: Bugfix Description: The Stream VFD was leaking memory on every opened file. Solution: In H5FD_stream_close(), finally free the file structure used to describe the closed file. Platforms tested: Linux, SGI --- src/H5FDstream.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/src/H5FDstream.c b/src/H5FDstream.c index ba07ae4..5aef41f 100644 --- a/src/H5FDstream.c +++ b/src/H5FDstream.c @@ -136,7 +136,7 @@ static const H5FD_class_t H5FD_stream_g = H5FD_stream_open, /* open */ H5FD_stream_close, /* close */ NULL, /* cmp */ - H5FD_stream_query, /*query */ + H5FD_stream_query, /*query */ NULL, /* alloc */ NULL, /* free */ H5FD_stream_get_eoa, /* get_eoa */ @@ -748,23 +748,24 @@ static herr_t H5FD_stream_close (H5FD_t *_stream) H5MM_xfree (stream->mem); } memset (stream, 0, sizeof (H5FD_stream_t)); + H5MM_xfree (stream); FUNC_LEAVE (0); } /*------------------------------------------------------------------------- - * Function: H5FD_stream_query + * Function: H5FD_stream_query * - * Purpose: Set the flags that this VFL driver is capable of supporting. - * (listed in H5FDpublic.h) + * Purpose: Set the flags that this VFL driver is capable of supporting. + * (listed in H5FDpublic.h) * - * Return: Success: non-negative + * Return: Success: non-negative * - * Failure: negative + * Failure: negative * - * Programmer: Quincey Koziol - * Tuesday, September 26, 2000 + * Programmer: Quincey Koziol + * Tuesday, September 26, 2000 * * Modifications: * -- cgit v0.12