From a12ecb5d1f128ea7d9dcc6c96f438534d1f43ca7 Mon Sep 17 00:00:00 2001 From: Andre Noll Date: Sat, 20 Jul 2013 21:08:15 +0200 Subject: [PATCH] ipc: Close proc fd. We read shmmax only once, so there is no point in keeping this file descriptor open forever. --- ipc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/ipc.c b/ipc.c index 1ec53c30..89bbe535 100644 --- a/ipc.c +++ b/ipc.c @@ -209,6 +209,7 @@ size_t shm_get_shmmax(void) buf[ret] = '\0'; shmmax = strtoul(buf, NULL, 10); } + close(fd); } } #elif defined SYSCTL_SHMMAX_VARIABLE -- 2.39.5