hwmon: (fschmd) Fix a memleak on multiple opens of /dev/watchdog
authorHans de Goede <hdegoede@redhat.com>
Mon, 25 Jan 2010 14:00:50 +0000 (15:00 +0100)
committerJean Delvare <khali@linux-fr.org>
Mon, 25 Jan 2010 14:00:50 +0000 (15:00 +0100)
commitc453615f77aa51593c1c9c9031b4278797d3fd19
tree7d6c05c9487b311d4f276d4c4bdf42d4e06fa445
parent5542482b9c61c2588f1178f315310a794988051a
hwmon: (fschmd) Fix a memleak on multiple opens of /dev/watchdog

When /dev/watchdog gets opened a second time we return -EBUSY, but
we already have got a kref then, so we end up leaking our data struct.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: stable@kernel.org
drivers/hwmon/fschmd.c