diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/til_stream.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/til_stream.c b/src/til_stream.c index 0f35a17..247dbf3 100644 --- a/src/til_stream.c +++ b/src/til_stream.c @@ -131,10 +131,13 @@ int til_stream_active(til_stream_t *stream) til_stream_t * til_stream_free(til_stream_t *stream) { + unsigned leaked; + if (!stream) return NULL; - til_stream_gc_module_contexts(stream); + leaked = til_stream_gc_module_contexts(stream); + assert(!leaked); for (int i = 0; i < TIL_STREAM_PIPE_BUCKETS_COUNT; i++) { for (til_stream_pipe_t *p = stream->pipe_buckets[i], *p_next; p != NULL; p = p_next) { |