diff --git a/WHATS_NEW_DM b/WHATS_NEW_DM index 1a7786c8c..84fef3a29 100644 --- a/WHATS_NEW_DM +++ b/WHATS_NEW_DM @@ -1,5 +1,6 @@ Version 1.02.70 - =================================== + Fix fd resource leak in error path for _udev_notify_sem_create(). Leave space for '\0' for readline() call in _sysfs_get_kernel_name(). Version 1.02.69 - 1st February 2012 diff --git a/libdm/libdm-common.c b/libdm/libdm-common.c index 2fb5e5e52..94809f95c 100644 --- a/libdm/libdm-common.c +++ b/libdm/libdm-common.c @@ -1738,7 +1738,7 @@ static int _udev_notify_sem_create(uint32_t *cookie, int *semid) log_error("semid %d: sem_ctl GETVAL failed for " "cookie 0x%" PRIx32 ": %s", gen_semid, gen_cookie, strerror(errno)); - return 0; + goto bad; } log_debug("Udev cookie 0x%" PRIx32 " (semid %d) incremented to %d",