.
OBS-URL: https://build.opensuse.org/package/show/Base:System/procps?expand=0&rev=8
This commit is contained in:
parent
e926e96f5b
commit
482226127a
18
procps-3.2.8-fdleak.dif
Normal file
18
procps-3.2.8-fdleak.dif
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
--- vmstat.c
|
||||||
|
+++ vmstat.c 2009-09-10 10:10:17.509902189 +0200
|
||||||
|
@@ -413,13 +413,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){
|
||||||
|
fprintf(stderr, "Your kernel doesn't support slabinfo.\n");
|
||||||
|
return;
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user