From: Juha-Pekka Heikkila Date: Fri, 27 Jun 2014 12:22:04 +0000 (+0300) Subject: loader: Check dlsym() did not fail in libudev_get_device_name_for_fd() X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=261120daefbf3681394c52928e19f901a5f46d61;p=mesa.git loader: Check dlsym() did not fail in libudev_get_device_name_for_fd() Signed-off-by: Juha-Pekka Heikkila Reviewed-by: Anuj Phogat --- diff --git a/src/loader/loader.c b/src/loader/loader.c index bdd39069149..94c993ac841 100644 --- a/src/loader/loader.c +++ b/src/loader/loader.c @@ -594,6 +594,9 @@ libudev_get_device_name_for_fd(int fd) (struct udev_device *)); UDEV_SYMBOL(struct udev *, udev_unref, (struct udev *)); + if (dlsym_failed) + return NULL; + udev = udev_new(); device = udev_device_new_from_fd(udev, fd); if (device == NULL)