The offending line you identified was not fixed as a bug fix that one could directly backport, but instead as part of [1]
Instead for an SRU we would need a more surgical approach, maybe just a check to the pointer like: if (file != NULL) fclose(file); I'm not so sure about the priority of this, how regular are you hitting that on 16.04.4? I had no rapid process spawn/kill workload, but in 10/10 tries I didn't hit that. Then I ran: $ stress-ng --fork 4 --vfork 4 --exec 4 --metrics-brief But still 10/10 pstree runs worked (and that is more than 100k forks/exits per sec). OTOH the change seems trivial, never the less I'd be interested how (reliably) you hit that. [1]: https://gitlab.com/psmisc/psmisc/commit/265fa43ee48898001130b90d3656d48af5d241aa ** Tags added: server-next ** Changed in: psmisc (Ubuntu Xenial) Status: New => Confirmed ** Changed in: psmisc (Ubuntu Xenial) Importance: Undecided => Medium -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1755681 Title: pstree crashes on fclose(NULL) To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/psmisc/+bug/1755681/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs