Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Leap:15.0:Staging:A
procps
procps-ng-3.3.10-fdleak.dif
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File procps-ng-3.3.10-fdleak.dif of Package procps
--- vmstat.c +++ vmstat.c 2015-01-27 14:59:34.049571755 +0000 @@ -40,6 +40,7 @@ #include <string.h> #include <sys/ioctl.h> #include <sys/types.h> +#include <sys/stat.h> #include <termios.h> #include <unistd.h> #include <time.h> @@ -690,13 +691,12 @@ static void slabheader(void) static void slabformat(void) { - FILE *fSlab; + struct stat fSlab; struct slab_cache *slabs; unsigned long nSlab, i, j, k; const char format[] = "%-24s %6u %6u %6u %6u\n"; - fSlab = fopen("/proc/slabinfo", "rb"); - if (!fSlab) { + if (stat("/proc/slabinfo", &fSlab) < 0) { xwarnx(_("your kernel does not support slabinfo or your permissions are insufficient")); return; } @@ -728,7 +728,6 @@ static void slabformat(void) } free(slabs); } - fclose(fSlab); } static void disksum_format(void)
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor