diff --git a/WHATS_NEW_DM b/WHATS_NEW_DM index 84fef3a29..f98432bab 100644 --- a/WHATS_NEW_DM +++ b/WHATS_NEW_DM @@ -1,5 +1,6 @@ Version 1.02.70 - =================================== + Set all parameters to 0 for dm_get_next_target() for NULL return. Fix fd resource leak in error path for _udev_notify_sem_create(). Leave space for '\0' for readline() call in _sysfs_get_kernel_name(). diff --git a/libdm/ioctl/libdm-iface.c b/libdm/ioctl/libdm-iface.c index 4658f21c0..fa38c4380 100644 --- a/libdm/ioctl/libdm-iface.c +++ b/libdm/ioctl/libdm-iface.c @@ -573,8 +573,13 @@ void *dm_get_next_target(struct dm_task *dmt, void *next, if (!t) t = dmt->head; - if (!t) + if (!t) { + *start = 0; + *length = 0; + *target_type = 0; + *params = 0; return NULL; + } *start = t->start; *length = t->length;