summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordelphij <delphij@FreeBSD.org>2008-01-12 00:54:47 +0000
committerdelphij <delphij@FreeBSD.org>2008-01-12 00:54:47 +0000
commit9a0396e98c7eb867befcf8fc68fcbe2574ea4875 (patch)
tree2ab5a83103c0a67d075e09fccc584c48a59d9c78
parent3f4eb439e29a73b7acefee30e2c2c48c3f48872f (diff)
downloadFreeBSD-src-9a0396e98c7eb867befcf8fc68fcbe2574ea4875.zip
FreeBSD-src-9a0396e98c7eb867befcf8fc68fcbe2574ea4875.tar.gz
Plug memory leaks that is observed when argbuf or argspc is used in the
context. Submitted by: Michal Vranek <michal.vranek seznam cz> PR: bin/118380 MFC after: 1 month
-rw-r--r--lib/libkvm/kvm.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/libkvm/kvm.c b/lib/libkvm/kvm.c
index 418a15d..e9d5a78 100644
--- a/lib/libkvm/kvm.c
+++ b/lib/libkvm/kvm.c
@@ -290,6 +290,10 @@ kvm_close(kd)
_kvm_freevtop(kd);
if (kd->procbase != 0)
free((void *)kd->procbase);
+ if (kd->argbuf != 0)
+ free((void *) kd->argbuf);
+ if (kd->argspc != 0)
+ free((void *) kd->argspc);
if (kd->argv != 0)
free((void *)kd->argv);
free((void *)kd);
OpenPOWER on IntegriCloud