summaryrefslogtreecommitdiff
path: root/src/loader/loader.c
diff options
context:
space:
mode:
authorJuha-Pekka Heikkila <juhapekka.heikkila@gmail.com>2014-06-27 15:22:04 +0300
committerTapani Pälli <tapani.palli@intel.com>2014-09-23 10:25:02 +0300
commit261120daefbf3681394c52928e19f901a5f46d61 (patch)
tree75950dc57d270a18f11ce298efc0ffe0af8bc5d7 /src/loader/loader.c
parentd2f0442bf632eef7dddcd77add8556f6be029b5e (diff)
loader: Check dlsym() did not fail in libudev_get_device_name_for_fd()
Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com> Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
Diffstat (limited to 'src/loader/loader.c')
-rw-r--r--src/loader/loader.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/loader/loader.c b/src/loader/loader.c
index bdd3906914..94c993ac84 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)