From ed30fb10e116856481908b3c5af23f30aa5f7ff2 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 4c343256..1eaba744 100644 --- a/lib/dpif-linux.c +++ b/lib/dpif-linux.c @@ -677,6 +677,8 @@ get_major(const char *target) } } + fclose(file); + VLOG_ERR("%s: %s major not found (is the module loaded?)", fn, target); return -ENODEV; } -- 2.30.2