e_input: unref udev_device after using it
[platform/upstream/enlightenment.git] / src / bin / e_input_evdev.c
index 0cbe09c..a340425 100644 (file)
@@ -89,7 +89,11 @@ _device_calibration_set(E_Input_Evdev *edev)
    if ((!vals) ||
        (sscanf(vals, "%f %f %f %f %f %f",
                &cal[0], &cal[1], &cal[2], &cal[3], &cal[4], &cal[5]) != 6))
-     return;
+     {
+        udev_device_unref(udev_device);
+        return;
+     }
+   udev_device_unref(udev_device);
 
    ELOGF("E_INPUT_EVDEV", "calibration_set cal[%lf %lf %lf %lf %lf %lf] (%d x %d)",
          NULL, cal[0], cal[1], cal[2], cal[3], cal[4], cal[5], w, h);
@@ -2491,7 +2495,11 @@ e_input_evdev_axis_size_set(E_Input_Evdev *edev, int w, int h)
    if ((!vals) ||
        (sscanf(vals, "%f %f %f %f %f %f",
                &cal[0], &cal[1], &cal[2], &cal[3], &cal[4], &cal[5]) != 6))
-     return;
+     {
+        udev_device_unref(udev_device);
+        return;
+     }
+   udev_device_unref(udev_device);
 
    ELOGF("E_INPUT_EVDEV", "axis_size_set cal[%lf %lf %lf %lf %lf %lf] (%d x %d)",
          NULL, cal[0], cal[1], cal[2], cal[3], cal[4], cal[5], w, h);