helper/args: hold a read lock in WriteTo
Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
This commit is contained in:
parent
be83ad838c
commit
831b1aad6f
|
@ -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")
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue