summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorIan Stakenvicius <axs@gentoo.org>2013-01-25 10:01:00 -0500
committerAnthony G. Basile <blueness@gentoo.org>2013-01-28 17:42:47 -0500
commit27a018b94e9e84a65cb0159b6d95e776b959f5d5 (patch)
tree90a84e4f8e22dac10be06b2faf837651df77f8e7 /src
parent26e92619267df364bac4aed29376a36669fb53d3 (diff)
Abort udev_enumerate_new if udev obj is null
https://bugs.freedesktop.org/show_bug.cgi?id=58289 systemd commit e68893075083a7461b1572233d23fdb23541d630 Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
Diffstat (limited to 'src')
-rw-r--r--src/libudev/libudev-enumerate.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/libudev/libudev-enumerate.c b/src/libudev/libudev-enumerate.c
index 172965511b..6a5f4e025e 100644
--- a/src/libudev/libudev-enumerate.c
+++ b/src/libudev/libudev-enumerate.c
@@ -81,6 +81,8 @@ _public_ struct udev_enumerate *udev_enumerate_new(struct udev *udev)
{
struct udev_enumerate *udev_enumerate;
+ if (udev == NULL)
+ return NULL;
udev_enumerate = calloc(1, sizeof(struct udev_enumerate));
if (udev_enumerate == NULL)
return NULL;