From 6dc6ff914570fcbe770ed5a5e529229142c5b9c1 Mon Sep 17 00:00:00 2001 From: Tetsuo NAKAGAWA Date: Thu, 25 Mar 2010 10:54:15 -0400 Subject: [PATCH] dpif-linux: Fix file descriptor leak. get_major() opens /proc/devices to get the openvswitch major number but never closes the FD. --- lib/dpif-linux.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/dpif-linux.c b/lib/dpif-linux.c index 2bf329f45..9a7231387 100644 --- a/lib/dpif-linux.c +++ b/lib/dpif-linux.c @@ -661,6 +661,8 @@ get_major(const char *target) } } + fclose(file); + VLOG_ERR("%s: %s major not found (is the module loaded?)", fn, target); return -ENODEV; } -- 2.43.0