Skip to content

Commit 609a524

Browse files
committed
Stop the background thread before destroying the docker async source
Otherwise we can access a half-destroyed object from the worker thread.
1 parent c2b8d30 commit 609a524

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

userspace/libsinsp/container_engine/docker_common.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ docker_async_source::docker_async_source(uint64_t max_wait_ms, uint64_t ttl_ms,
4343

4444
docker_async_source::~docker_async_source()
4545
{
46+
this->stop();
4647
g_logger.format(sinsp_logger::SEV_DEBUG,
4748
"docker_async: Source destructor");
4849

0 commit comments

Comments
 (0)