Skip to content
Snippets Groups Projects
Commit 21fd6a77 authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

streamClose: fix memory used after free()

parent 34c39c42
No related branches found
No related tags found
1 merge request!72M214003/develop
Pipeline #54671 passed
......@@ -1301,14 +1301,15 @@ streamClose(int streamID)
{
stream_t *streamptr = stream_to_pointer(streamID);
if (streamptr->lockIO) CDI_IO_LOCK();
bool lockIO = streamptr->lockIO;
if (lockIO) CDI_IO_LOCK();
if (CDI_Debug) Message("streamID = %d filename = %s", streamID, streamptr->filename);
streamDestroy(streamptr);
reshRemove(streamID, &streamOps);
if (CDI_Debug) Message("Removed stream %d from stream list", streamID);
if (streamptr->lockIO) CDI_IO_UNLOCK();
if (lockIO) CDI_IO_UNLOCK();
}
void
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment