HomeFreeBSD

libzfs: run_process: reuse line, don't leak it

Description

libzfs: run_process: reuse line, don't leak it

line will grow as wide as it needs (glibc starts off at 120),
we can store a narrower view; this also fixes leaks in a few scenarios

Reviewed-by: John Kennedy <john.kennedy@delphix.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #12082

Details

Provenance
наб <nabijaczleweli@nabijaczleweli.xyz>Authored on May 19 2021, 12:04 PM
Brian Behlendorf <behlendorf1@llnl.gov>Committed on May 21 2021, 4:48 PM
Parents
rG30dadd5c04be: libzfs: run_process: set O_NONBLOCK on lines pipe
Branches
Unknown
Tags
Unknown

Event Timeline

Brian Behlendorf <behlendorf1@llnl.gov> committed rG7c20ceebdd9c: libzfs: run_process: reuse line, don't leak it (authored by наб <nabijaczleweli@nabijaczleweli.xyz>).May 21 2021, 4:48 PM