summaryrefslogtreecommitdiff
path: root/libudev/libudev-device-private.c
diff options
context:
space:
mode:
authorKay Sievers <kay.sievers@vrfy.org>2010-04-23 09:22:42 +0200
committerKay Sievers <kay.sievers@vrfy.org>2010-04-23 09:22:42 +0200
commit65f099c721fa568350f8ac019e3a99fda1966082 (patch)
tree92342bee5a23f3a840a78f0bcca1435187b4a947 /libudev/libudev-device-private.c
parentc1dbe11dc336f9faf02073a66fe30a12bd438e23 (diff)
libudev: accept NULL in udev_device_get_tags_list_entry()
Diffstat (limited to 'libudev/libudev-device-private.c')
-rw-r--r--libudev/libudev-device-private.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libudev/libudev-device-private.c b/libudev/libudev-device-private.c
index 7e5fcbc293..8c8ac244be 100644
--- a/libudev/libudev-device-private.c
+++ b/libudev/libudev-device-private.c
@@ -51,7 +51,7 @@ int udev_device_tag_index(struct udev_device *dev, struct udev_device *dev_old,
struct udev_list_entry *list_entry;
bool found;
- if (add) {
+ if (add && dev_old != NULL) {
/* delete possible left-over tags */
udev_list_entry_foreach(list_entry, udev_device_get_tags_list_entry(dev_old)) {
const char *tag_old = udev_list_entry_get_name(list_entry);