setlogmask: fix uncloseed handle

Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
This commit is contained in:
yinshengkai 2023-08-28 10:34:16 +08:00 committed by Petro Karashchenko
parent 11de514217
commit 5a0bc863dd

View File

@ -73,6 +73,7 @@ static int print_channels(void)
memset(info, 0, sizeof(info));
ret = ioctl(fd, SYSLOGIOC_GETCHANNELS, &info);
close(fd);
if (ret < 0)
{
perror("Failed to get channels");