diff options
author | ken <ken@FreeBSD.org> | 1998-10-08 19:59:40 +0000 |
---|---|---|
committer | ken <ken@FreeBSD.org> | 1998-10-08 19:59:40 +0000 |
commit | 0754b967d88b0e1cc6357bc8a3cab865dbb290b5 (patch) | |
tree | f2910df779de5450615b0d479b7f78c4fb1de9b5 /libexec | |
parent | 414562d64deaa464859ce3f106ee42b126f16da5 (diff) | |
download | FreeBSD-src-0754b967d88b0e1cc6357bc8a3cab865dbb290b5.zip FreeBSD-src-0754b967d88b0e1cc6357bc8a3cab865dbb290b5.tar.gz |
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
Diffstat (limited to 'libexec')
-rw-r--r-- | libexec/rpc.rstatd/rstat_proc.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/libexec/rpc.rstatd/rstat_proc.c b/libexec/rpc.rstatd/rstat_proc.c index ad902fb..16e060c 100644 --- a/libexec/rpc.rstatd/rstat_proc.c +++ b/libexec/rpc.rstatd/rstat_proc.c @@ -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"; #endif 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 /* @@ -365,6 +365,9 @@ havedisk() } } + if (stats.dinfo->mem_ptr) + free(stats.dinfo->mem_ptr); + free(stats.dinfo); return(retval); } @@ -424,6 +427,9 @@ updatexfers(numdevs, devs) } } + if (stats.dinfo->mem_ptr) + free(stats.dinfo->mem_ptr); + free(stats.dinfo); } |