diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2023-02-17 13:58:20 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2023-02-17 13:58:20 -0800 |
commit | 4b89ca5a780f59f8762e22d2fbcfa64b95c8891d (patch) | |
tree | f2b3004a568ae478153c37304fcd2a9e50dd9e3c | |
parent | 6d2e62e162e143330f8543e88bc298c77ca34e03 (diff) | |
parent | 79eeab1d85e0fee4c0bc36f3b6ddf3920f39f74b (diff) |
Merge tag 'gpio-fixes-for-v6.2-part2' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux
Pull gpio fix from Bartosz Golaszewski:
- fix a memory leak in gpio-sim that was triggered every time libgpiod
tests are run in user-space
* tag 'gpio-fixes-for-v6.2-part2' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux:
gpio: sim: fix a memory leak
-rw-r--r-- | drivers/gpio/gpio-sim.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpio/gpio-sim.c b/drivers/gpio/gpio-sim.c index 60514bc5454f..9e3893b19e4f 100644 --- a/drivers/gpio/gpio-sim.c +++ b/drivers/gpio/gpio-sim.c @@ -736,7 +736,7 @@ static void gpio_sim_remove_hogs(struct gpio_sim_device *dev) gpiod_remove_hogs(dev->hogs); - for (hog = dev->hogs; !hog->chip_label; hog++) { + for (hog = dev->hogs; hog->chip_label; hog++) { kfree(hog->chip_label); kfree(hog->line_name); } |