]> git.ipfire.org Git - thirdparty/util-linux.git/commit
lib/shells: Plug econf memory leak
authorTobias Stoeckmann <tobias@stoeckmann.org>
Thu, 18 May 2023 15:48:46 +0000 (17:48 +0200)
committerTobias Stoeckmann <tobias@stoeckmann.org>
Thu, 18 May 2023 15:48:46 +0000 (17:48 +0200)
commitb83e58a55ce4ac0f2e9b613f53eccde4bce09ff7
tree359d6692478d7ac1009d0c86568ee30732980a6e
parent01a0a556018694bfaf6b01a5a40f8d0d10641a1f
lib/shells: Plug econf memory leak

You can see the memory leak with address sanitizer if util-linux is
compiled with `--with-vendordir=/usr/etc`.

How to reproduce:

1. Prepare a custom shell file as root
```
mkdir -p /etc/shells.d
echo /bin/myshell > /etc/shells.d/custom
```

2. Run chsh as regular user
```
chsh
```

Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
lib/shells.c