Fix a memory leak in rpc.rstatd that shows up when it's run in standalone
mode. (i.e., not from inetd) PR: bin/8212
This commit is contained in:
parent
5a948e4ba7
commit
b994e5358d
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=40078
@ -33,7 +33,7 @@ static char sccsid[] = "from: @(#)rpc.rstatd.c 1.1 86/09/25 Copyr 1984 Sun Micro
|
|||||||
static char sccsid[] = "from: @(#)rstat_proc.c 2.2 88/08/01 4.0 RPCSRC";
|
static char sccsid[] = "from: @(#)rstat_proc.c 2.2 88/08/01 4.0 RPCSRC";
|
||||||
#endif
|
#endif
|
||||||
static const char rcsid[] =
|
static const char rcsid[] =
|
||||||
"$Id: rstat_proc.c,v 1.11 1998/09/15 08:15:20 gibbs Exp $";
|
"$Id: rstat_proc.c,v 1.12 1998/09/16 21:33:14 dfr Exp $";
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -365,6 +365,9 @@ havedisk()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (stats.dinfo->mem_ptr)
|
||||||
|
free(stats.dinfo->mem_ptr);
|
||||||
|
|
||||||
free(stats.dinfo);
|
free(stats.dinfo);
|
||||||
return(retval);
|
return(retval);
|
||||||
}
|
}
|
||||||
@ -424,6 +427,9 @@ updatexfers(numdevs, devs)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (stats.dinfo->mem_ptr)
|
||||||
|
free(stats.dinfo->mem_ptr);
|
||||||
|
|
||||||
free(stats.dinfo);
|
free(stats.dinfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user