From: Ben Pfaff Date: Wed, 31 Dec 2008 00:06:06 +0000 (-0800) Subject: vswitchd: Fix fd leaks by closing files that we read in read_file(). X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=87073a3699813e006649c2f4d18f819c689ededb;p=openvswitch vswitchd: Fix fd leaks by closing files that we read in read_file(). Fixes bug #697. Thanks to Martin for reporting this bug. --- diff --git a/vswitchd/cfg.c b/vswitchd/cfg.c index 55f43199..b0915494 100644 --- a/vswitchd/cfg.c +++ b/vswitchd/cfg.c @@ -615,6 +615,8 @@ read_file(const char *file_name) svec_sort(&cfg); svec_terminate(&cfg); + + fclose(file); } static int