diff options
author | gVisor bot <gvisor-bot@google.com> | 2021-09-21 22:44:29 +0000 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2021-09-21 22:44:29 +0000 |
commit | 9f386d85fdba31791102717b390adc74c839a2fa (patch) | |
tree | eb4a7e7389d7584d882c479ed0cf61aad25be807 /pkg/sentry | |
parent | 11acecfe692f6de652ed94343618dfcd9324af94 (diff) | |
parent | c485602ded3982f8fd1078e34a4b298879f1807e (diff) |
Merge release-20210906.0-53-gc485602de (automated)
Diffstat (limited to 'pkg/sentry')
-rw-r--r-- | pkg/sentry/socket/unix/transport/queue.go | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/pkg/sentry/socket/unix/transport/queue.go b/pkg/sentry/socket/unix/transport/queue.go index a9cedcf5f..188ad3bd9 100644 --- a/pkg/sentry/socket/unix/transport/queue.go +++ b/pkg/sentry/socket/unix/transport/queue.go @@ -59,12 +59,14 @@ func (q *queue) Close() { // q.WriterQueue.Notify(waiter.WritableEvents) func (q *queue) Reset(ctx context.Context) { q.mu.Lock() - for cur := q.dataList.Front(); cur != nil; cur = cur.Next() { - cur.Release(ctx) - } + dataList := q.dataList q.dataList.Reset() q.used = 0 q.mu.Unlock() + + for cur := dataList.Front(); cur != nil; cur = cur.Next() { + cur.Release(ctx) + } } // DecRef implements RefCounter.DecRef. |