timer_hw: fix file descriptor leak

See: bug#2465
This commit is contained in:
Jaroslav Kysela 2006-09-29 10:34:22 +02:00
parent 35b1df509f
commit 10c396516a

View file

@ -264,8 +264,8 @@ int snd_timer_hw_open(snd_timer_t **handle, const char *name, int dev_class, int
}
if (ioctl(fd, SNDRV_TIMER_IOCTL_TREAD, &arg) < 0) {
ret = -errno;
close(fd);
__no_tread:
close(fd);
SNDMSG("extended read is not supported (SNDRV_TIMER_IOCTL_TREAD)");
return ret;
}