From: Tetsuo NAKAGAWA Date: Thu, 25 Mar 2010 14:54:15 +0000 (-0400) Subject: dpif-linux: Fix file descriptor leak. X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=6dc6ff914570fcbe770ed5a5e529229142c5b9c1;p=sliver-openvswitch.git dpif-linux: Fix file descriptor leak. get_major() opens /proc/devices to get the openvswitch major number but never closes the FD. --- 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; }