From 54ed0966b004e78cf454982904819906e8d9e953 Mon Sep 17 00:00:00 2001 From: Sheikh Muneeb Ahmed Date: Tue, 28 Jul 2026 23:00:52 +0500 Subject: [PATCH] libpod: propagate request context in HTTPAttach to prevent leak Fixes: #29323 Signed-off-by: Sheikh Muneeb Ahmed --- libpod/oci_conmon_common.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/libpod/oci_conmon_common.go b/libpod/oci_conmon_common.go index 28108dab48..b01291b325 100644 --- a/libpod/oci_conmon_common.go +++ b/libpod/oci_conmon_common.go @@ -5,7 +5,6 @@ package libpod import ( "bufio" "bytes" - "context" "errors" "fmt" "io" @@ -596,7 +595,7 @@ func (r *ConmonOCIRuntime) HTTPAttach(ctr *Container, req *http.Request, w http. } errChan <- err }() - if err := ctr.ReadLog(context.Background(), logOpts, logChan, 0); err != nil { + if err := ctr.ReadLog(req.Context(), logOpts, logChan, 0); err != nil { return err } go func() {