Commit 6eba4960 authored by Thomas Jahns's avatar Thomas Jahns 🤸
Browse files

Fix memory leak for NetCDF files without time dimension.

parent 9bd7f004
......@@ -977,6 +977,11 @@ void cdiStreamCloseDefaultDelegate(stream_t *streamptr, int recordBufIsToBeDelet
case CDI_FILETYPE_NC4C:
{
cdfClose(fileID);
if (streamptr->ntsteps == 0)
{
Free(streamptr->tsteps[0].records);
Free(streamptr->tsteps[0].recIDs);
}
break;
}
#endif
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment