Commit 1b683268 authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

stream_ieg: bug fix memory leak

parent 15f6388d
2007-05-?? Uwe Schulzweida <Uwe.Schulzweida@zmaw.de>
* using EXSE library version 1.0.2
* stream_ieg: bug fix memory leak [report: Philip Lorenz]
* zaxisDuplicate: bug fix
* cdfInqContents: check also x/yvarid to compare curvilinear grids
* Version 1.0.7 released
......
......@@ -32,7 +32,7 @@ static int extDefaultDprec = 0;
*/
#undef LIBVERSION
#define LIBVERSION 1.0.1
#define LIBVERSION 1.0.2
#define XSTRING(x) #x
#define STRING(x) XSTRING(x)
static const char ext_libvers[] = STRING(LIBVERSION) " of "__DATE__" "__TIME__;
......
......@@ -76,6 +76,7 @@ int iegCheckFiletype(int fileID, int *swap);
IEGREC *iegNew(void);
void iegDelete(IEGREC *iegp);
void iegInit(IEGREC *iegp);
void iegInitMem(IEGREC *iegp);
int iegRead(int fileID, IEGREC *iegp);
int iegWrite(int fileID, IEGREC *iegp);
......
......@@ -29,7 +29,7 @@ static int iegDefaultDprec = 0;
*/
#undef LIBVERSION
#define LIBVERSION 1.0.1
#define LIBVERSION 1.0.2
#define XSTRING(x) #x
#define STRING(x) XSTRING(x)
static const char ieg_libvers[] = STRING(LIBVERSION) " of "__DATE__" "__TIME__;
......@@ -106,7 +106,11 @@ void iegInit(IEGREC *iegp)
iegp->datasize = 0;
iegp->buffersize = 0;
iegp->buffer = NULL;
}
void iegInitMem(IEGREC *iegp)
{
memset(iegp->ipdb, 0, sizeof(iegp->ipdb));
memset(iegp->igdb, 0, sizeof(iegp->igdb));
memset(iegp->vct, 0, sizeof(iegp->vct));
......@@ -123,6 +127,7 @@ IEGREC *iegNew(void)
iegp = (IEGREC *) malloc(sizeof(IEGREC));
iegInit(iegp);
iegInitMem(iegp);
return (iegp);
}
......
......@@ -32,7 +32,7 @@ static int srvDefaultDprec = 0;
*/
#undef LIBVERSION
#define LIBVERSION 1.0.1
#define LIBVERSION 1.0.2
#define XSTRING(x) #x
#define STRING(x) XSTRING(x)
static const char srv_libvers[] = STRING(LIBVERSION) " of "__DATE__" "__TIME__;
......
......@@ -545,7 +545,7 @@ int iegDefRecord(int streamID)
gridID = vlistInqVarGrid(vlistID, varID);
zaxisID = vlistInqVarZaxis(vlistID, varID);
iegInit(iegp);
iegInitMem(iegp);
for ( i = 0; i < 37; i++ ) iegp->ipdb[i] = -1;
iegp->byteswap = getByteswap(byteorder);
......@@ -1371,7 +1371,7 @@ void iegWriteVarDP(int streamID, int varID, const double *data)
iegp = streamptr->record->iegp;
iegInit(iegp);
iegInitMem(iegp);
for ( i = 0; i < 37; i++ ) iegp->ipdb[i] = -1;
vlistID = streamInqVlist(streamID);
......
Markdown is supported
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