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
2dedb75e
Commit
2dedb75e
authored
Jul 14, 2017
by
Uwe Schulzweida
Browse files
cdiStreamCloseDefaultDelegate: check pointers before Free().
parent
10bb0003
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/stream.c
View file @
2dedb75e
...
...
@@ -979,8 +979,16 @@ void cdiStreamCloseDefaultDelegate(stream_t *streamptr, int recordBufIsToBeDelet
cdfClose
(
fileID
);
if
(
streamptr
->
ntsteps
==
0
)
{
Free
(
streamptr
->
tsteps
[
0
].
records
);
Free
(
streamptr
->
tsteps
[
0
].
recIDs
);
if
(
streamptr
->
tsteps
[
0
].
records
)
{
Free
(
streamptr
->
tsteps
[
0
].
records
);
streamptr
->
tsteps
[
0
].
records
=
NULL
;
}
if
(
streamptr
->
tsteps
[
0
].
recIDs
)
{
Free
(
streamptr
->
tsteps
[
0
].
recIDs
);
streamptr
->
tsteps
[
0
].
recIDs
=
NULL
;
}
}
break
;
}
...
...
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