compositor-drm: Fix invalid usage of udev ressources

The reference returned by udev_list_entry_get_name is
only valid until udev_enumerate_unref is called.
Call unref after the last usage of such.
dev
Benjamin Franzke 13 years ago
parent a764ee5158
commit 02dee2caad
  1. 5
      compositor/compositor-drm.c

@ -826,8 +826,6 @@ drm_compositor_create(struct wl_display *display,
udev_device_unref(device);
}
udev_enumerate_unref(e);
if (drm_device == NULL) {
fprintf(stderr, "no drm device found\n");
return NULL;
@ -858,6 +856,9 @@ drm_compositor_create(struct wl_display *display,
return NULL;
}
udev_enumerate_unref(e);
path = NULL;
evdev_input_add_devices(&ec->base, ec->udev, seat);
loop = wl_display_get_event_loop(ec->base.wl_display);

Loading…
Cancel
Save