Commit 84b4eac4 authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

merge: move vlistDestroy after streamClose

parent ef51e598
......@@ -2,6 +2,7 @@
* New operator: setpartabv
* add new parameter table format
* merge: move vlistDestroy after streamClose (report: Matthias Cuntz)
* gradsdes: fix bug for only one record without time (report: Angelika Heil)
* namelist update
* history format changed to nco
......
......@@ -249,11 +249,11 @@ void *Expr(void *argument)
tsID++;
}
vlistDestroy(vlistID2);
streamClose(streamID2);
streamClose(streamID1);
vlistDestroy(vlistID2);
if ( array ) free(array);
cdoFinish();
......
......@@ -239,7 +239,6 @@ void *Input(void *argument)
if ( streamID < 0 ) cdiError(streamID, "Open failed on %s", cdoStreamName(0));
streamDefVlist(streamID, vlistID);
vlistDestroy(vlistID);
}
vdate = date;
......@@ -258,7 +257,11 @@ void *Input(void *argument)
tsID++;
}
if ( streamID >= 0 ) streamClose(streamID);
if ( streamID >= 0 )
{
streamClose(streamID);
vlistDestroy(vlistID);
}
if ( array ) free(array);
......
......@@ -84,7 +84,6 @@ void *Merge(void *argument)
vlistDefTaxis(vlistID2, taxisID2);
streamDefVlist(streamID2, vlistID2);
vlistDestroy(vlistID2);
if ( ! lcopy )
{
......@@ -144,6 +143,8 @@ void *Merge(void *argument)
streamClose(streamID2);
vlistDestroy(vlistID2);
if ( streamIDs ) free(streamIDs);
if ( vlistIDs ) free(vlistIDs);
......
......@@ -333,11 +333,11 @@ void *Select(void *argument)
tsID++;
}
vlistDestroy(vlistID2);
streamClose(streamID2);
streamClose(streamID1);
vlistDestroy(vlistID2);
if ( ! lcopy )
if ( array ) free(array);
......
......@@ -82,7 +82,6 @@ void *Vargen(void *argument)
if ( streamID < 0 ) cdiError(streamID, "Open failed on %s", cdoStreamName(0));
streamDefVlist(streamID, vlistID);
vlistDestroy(vlistID);
gridsize = gridInqSize(gridID);
array = (double *) malloc(gridsize*sizeof(double));
......@@ -112,6 +111,8 @@ void *Vargen(void *argument)
streamClose(streamID);
vlistDestroy(vlistID);
if ( array ) free(array);
cdoFinish();
......
......@@ -100,7 +100,6 @@ void *Varrms(void *argument)
if ( streamID3 < 0 ) cdiError(streamID3, "Open failed on %s", cdoStreamName(2));
streamDefVlist(streamID3, vlistID3);
vlistDestroy(vlistID3);
vardata1 = (double **) malloc(nvars*sizeof(double*));
vardata2 = (double **) malloc(nvars*sizeof(double*));
......@@ -180,6 +179,8 @@ void *Varrms(void *argument)
streamClose(streamID2);
streamClose(streamID1);
vlistDestroy(vlistID3);
if ( field1.weight ) free(field1.weight);
for ( varID = 0; varID < nvars; varID++ )
......
......@@ -92,7 +92,6 @@ void *Vertstat(void *argument)
if ( streamID2 < 0 ) cdiError(streamID2, "Open failed on %s", cdoStreamName(1));
streamDefVlist(streamID2, vlistID2);
vlistDestroy(vlistID2);
gridsize = vlistGridsizeMax(vlistID1);
......@@ -237,6 +236,8 @@ void *Vertstat(void *argument)
streamClose(streamID2);
streamClose(streamID1);
vlistDestroy(vlistID2);
cdoFinish();
return (0);
......
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