Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mpim-sw
libcdi
Commits
1b683268
Commit
1b683268
authored
Apr 10, 2007
by
Uwe Schulzweida
Browse files
stream_ieg: bug fix memory leak
parent
15f6388d
Changes
6
Hide whitespace changes
Inline
Side-by-side
ChangeLog
View file @
1b683268
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
...
...
src/extralib.c
View file @
1b683268
...
...
@@ -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__
;
...
...
src/ieg.h
View file @
1b683268
...
...
@@ -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
);
...
...
src/ieglib.c
View file @
1b683268
...
...
@@ -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
);
}
...
...
src/servicelib.c
View file @
1b683268
...
...
@@ -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__
;
...
...
src/stream_ieg.c
View file @
1b683268
...
...
@@ -545,7 +545,7 @@ int iegDefRecord(int streamID)
gridID
=
vlistInqVarGrid
(
vlistID
,
varID
);
zaxisID
=
vlistInqVarZaxis
(
vlistID
,
varID
);
iegInit
(
iegp
);
iegInit
Mem
(
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
);
iegInit
Mem
(
iegp
);
for
(
i
=
0
;
i
<
37
;
i
++
)
iegp
->
ipdb
[
i
]
=
-
1
;
vlistID
=
streamInqVlist
(
streamID
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment