summaryrefslogtreecommitdiff
path: root/usr/src/cmd/prstat/prstat.c
diff options
context:
space:
mode:
author <gerald.jelinek@sun.com>2009-05-01 06:45:23 -0600
committer <gerald.jelinek@sun.com>2009-05-01 06:45:23 -0600
commite1009cb0cf252c69c92dc5b5d800c22d94a06659 (patch)
tree4bf3f46c8173a8f9a5b00cad500a2433772351ff /usr/src/cmd/prstat/prstat.c
parentebb3b3c9a7dc1d0a4fe442ec51779a092f7b4c34 (diff)
downloadillumos-joyent-e1009cb0cf252c69c92dc5b5d800c22d94a06659.tar.gz
6826349 prstat -Z leaks memory in osol_110 and s10u6.
Contributed by Andrew Heyn <andrewheyn@yahoo.com>.
Diffstat (limited to 'usr/src/cmd/prstat/prstat.c')
-rw-r--r--usr/src/cmd/prstat/prstat.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/usr/src/cmd/prstat/prstat.c b/usr/src/cmd/prstat/prstat.c
index 34f5feff05..944b122b7c 100644
--- a/usr/src/cmd/prstat/prstat.c
+++ b/usr/src/cmd/prstat/prstat.c
@@ -293,6 +293,7 @@ list_getsize(list_t *list)
* Failure for some other reason. Prstat will use the size
* already gathered from psinfo.
*/
+ free(results);
return;
}
for (id = list->l_head; id != NULL; id = id->id_next) {
@@ -335,6 +336,7 @@ list_getsize(list_t *list)
* gathered from psinfo.
*/
}
+ free(results);
}
/*