Skip to content

Commit 4b89ca5

Browse files
committed
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
2 parents 6d2e62e + 79eeab1 commit 4b89ca5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/gpio/gpio-sim.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -736,7 +736,7 @@ static void gpio_sim_remove_hogs(struct gpio_sim_device *dev)
736736

737737
gpiod_remove_hogs(dev->hogs);
738738

739-
for (hog = dev->hogs; !hog->chip_label; hog++) {
739+
for (hog = dev->hogs; hog->chip_label; hog++) {
740740
kfree(hog->chip_label);
741741
kfree(hog->line_name);
742742
}

0 commit comments

Comments
 (0)