From d941e2ee75211af83d943b1d03659ede908f8085 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20K=C4=99pie=C5=84?= Date: Tue, 26 Mar 2019 17:30:53 +0100 Subject: [PATCH] src/libudev/libudev-device.c: properly handle empty tag list MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See: https://github.com/gentoo/eudev/pull/171 Signed-off-by: Michał Kępień Signed-off-by: Anthony G. Basile --- src/libudev/libudev-device.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/libudev/libudev-device.c b/src/libudev/libudev-device.c index f651805fa..ac67ce846 100644 --- a/src/libudev/libudev-device.c +++ b/src/libudev/libudev-device.c @@ -1392,6 +1392,8 @@ _public_ struct udev_list_entry *udev_device_get_properties_list_entry(struct ud udev_list_entry_foreach(list_entry, udev_device_get_tags_list_entry(udev_device)) l = strpcpyl(&s, l, udev_list_entry_get_name(list_entry), ":", NULL); udev_device_add_property_internal(udev_device, "TAGS", tags); + } else { + udev_device_add_property_internal(udev_device, "TAGS", NULL); } } return udev_list_get_entry(&udev_device->properties_list);