leak-checker: Stop logging after fstat() fails.
authorBen Pfaff <blp@nicira.com>
Thu, 30 Apr 2009 21:42:38 +0000 (14:42 -0700)
committerBen Pfaff <blp@nicira.com>
Thu, 30 Apr 2009 21:45:32 +0000 (14:45 -0700)
When fstat() fails, we should either stop logging or re-set the leak
checker hooks.  The previous code didn't do either.

lib/leak-checker.c

index 83576af25d2b4337a69491429a7765a2d02ef80e..e91b7a69a95e046c97a65fe7e06536c63505a6ca 100644 (file)
@@ -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) {