From: Peter Hutterer Date: Thu, 5 Dec 2013 08:37:26 +0000 (+1000) Subject: udev-seat: fix leak when failing to add devices X-Git-Tag: 0.1.0~151 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d50c5108c146db654335a63ab799d74308e5ef25;p=platform%2Fupstream%2Flibinput.git udev-seat: fix leak when failing to add devices udev-monitor and the udev_monitor_source would leak. Signed-off-by: Peter Hutterer --- diff --git a/src/udev-seat.c b/src/udev-seat.c index 9a1ce7aa..08357f8c 100644 --- a/src/udev-seat.c +++ b/src/udev-seat.c @@ -227,8 +227,10 @@ udev_input_enable(struct udev_input *input) return -1; } - if (udev_input_add_devices(input, udev) < 0) + if (udev_input_add_devices(input, udev) < 0) { + udev_input_disable(input); return -1; + } return 0; }