]> mj.ucw.cz Git - libucw.git/commit
Logging: Fixed a bug in log_close_all().
authorMartin Mares <mj@ucw.cz>
Thu, 19 Feb 2009 17:03:14 +0000 (18:03 +0100)
committerMartin Mares <mj@ucw.cz>
Thu, 19 Feb 2009 17:03:14 +0000 (18:03 +0100)
commit1e3a1935f1b1778b40a7d5276c7b2f8c311756e7
tree16e8b0c8a104a8e1ab6943e3a098d90e1c8db878
parent15285bff6af22f231be0a255e0e2d831a3385b6a
Logging: Fixed a bug in log_close_all().

Under some circumstances (involving loops in substream structure),
log_close_all() crashed, because a stream could have become freed
when removing its substreams.

I have changed log_close_all() to unlink all substreams first and
then proceed with deallocating memory.

The same problem can never occur in simple log_close_stream(),
because a stream that is a part of a loop never gets a use count of 0.
ucw/log-stream.c