From 5a0bc863dddd36bd7ae87f023032d172d3e80b42 Mon Sep 17 00:00:00 2001 From: yinshengkai Date: Mon, 28 Aug 2023 10:34:16 +0800 Subject: [PATCH] setlogmask: fix uncloseed handle Signed-off-by: yinshengkai --- system/setlogmask/setlogmask.c | 1 + 1 file changed, 1 insertion(+) diff --git a/system/setlogmask/setlogmask.c b/system/setlogmask/setlogmask.c index 009c915b6..83c091741 100644 --- a/system/setlogmask/setlogmask.c +++ b/system/setlogmask/setlogmask.c @@ -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");