diff options
author | Renaud Métrich <rmetrich@redhat.com> | 2024-04-22 14:47:41 +0200 |
---|---|---|
committer | Jake Hunsaker <jacob.r.hunsaker@gmail.com> | 2024-04-22 10:12:09 -0400 |
commit | 3b15149de1fd3eb7716732961e257467fbd6f200 (patch) | |
tree | f6ddc95caa31f704c0fe9bd340c38279d1e25a39 /bin | |
parent | bf5301188ac27373d376cb657ad67c5e2a213248 (diff) | |
download | sos-3b15149de1fd3eb7716732961e257467fbd6f200.tar.gz |
[pkg] Don't initialize _packages to empty set
When initializing _packages, a distinction must be made between not
having any package and not being initialized at all.
Otherwise, if a package manager returns no package, the query command
will execute hundreds of times.
This can reproduce with 'flatpak' on RHEL when no package is returned:
# flatpak list
--> no output
# strace -fttTvyy -s 128 -e execve -o sos.strace -- ./bin/sos report
[...]
Press ENTER to continue, or CTRL-C to quit.
^C
# grep -c ' execve("/usr/sbin/flatpak"' sos.strace
350
Signed-off-by: Renaud Métrich <rmetrich@redhat.com>
Diffstat (limited to 'bin')
0 files changed, 0 insertions, 0 deletions