mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-22 17:35:59 +03:00
Fix fd resource leak in error path
Use 'goto bad' to cleanup fd on error path.
This commit is contained in:
parent
4443aa41cc
commit
e48d39cba0
@ -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
|
||||
|
@ -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",
|
||||
|
Loading…
Reference in New Issue
Block a user