From: Ben Pfaff Date: Thu, 30 Apr 2009 21:42:38 +0000 (-0700) Subject: leak-checker: Stop logging after fstat() fails. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2d4e65e886b3e4baa413da142205487acf2e0a6d;p=openvswitch leak-checker: Stop logging after fstat() fails. When fstat() fails, we should either stop logging or re-set the leak checker hooks. The previous code didn't do either. --- diff --git a/lib/leak-checker.c b/lib/leak-checker.c index 83576af2..e91b7a69 100644 --- a/lib/leak-checker.c +++ b/lib/leak-checker.c @@ -181,6 +181,7 @@ reset_hooks(void) if (fstat(fileno(file), &s) < 0) { VLOG_WARN("cannot fstat leak checker log file: %s", strerror(errno)); + leak_checker_stop(); return; } if (s.st_size > limit) {