aboutsummaryrefslogtreecommitdiffhomepage
path: root/helper
diff options
context:
space:
mode:
authorOphestra Umiker <cat@ophivana.moe>2024-09-24 20:22:37 +0900
committerOphestra Umiker <cat@ophivana.moe>2024-09-24 20:22:37 +0900
commit831b1aad6f2252f0f2ec672f201f42826e31130b (patch)
treed917dab1ab8981e8bd8d8716c1eb011cfd25929d /helper
parentbe83ad838ca5192ac79184341819f6c06e82e3bc (diff)
helper/args: hold a read lock in WriteTo
Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
Diffstat (limited to 'helper')
-rw-r--r--helper/args.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/helper/args.go b/helper/args.go
index bbb66f0c..8ef07f4a 100644
--- a/helper/args.go
+++ b/helper/args.go
@@ -62,6 +62,9 @@ func (a *argsFD) Seal(args []string) error {
}
func (a *argsFD) WriteTo(w io.Writer) (int64, error) {
+ a.RLock()
+ defer a.RUnlock()
+
if a.seal == nil {
panic("attempted to activate unsealed args")
}