libzfs: run_process: reuse line, don't leak it
commit7c20ceebdd9ca7ad30dd8035c5550875fd71d0cc
authorнаб <nabijaczleweli@nabijaczleweli.xyz>
Wed, 19 May 2021 12:04:19 +0000 (19 14:04 +0200)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Fri, 21 May 2021 16:48:59 +0000 (21 09:48 -0700)
treefd0581854446be5d9487fc330fcc95640e9eb43b
parent30dadd5c04be1f88c5fa6ab7f32b7573a9eee981
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
lib/libzfs/libzfs_util.c