summaryrefslogtreecommitdiff
path: root/usr.bin/pmdb
diff options
context:
space:
mode:
authorPeter Valchev <pvalchev@cvs.openbsd.org>2003-04-05 18:16:22 +0000
committerPeter Valchev <pvalchev@cvs.openbsd.org>2003-04-05 18:16:22 +0000
commitecf818548017a8a5a74753890eda995b94e98502 (patch)
tree9e02f964d6d7a21e3d6592e16aa9d933cff424fc /usr.bin/pmdb
parentba3d77f2bad1112444f5e0320975b17171baab49 (diff)
free value after asprintf; ok art
Diffstat (limited to 'usr.bin/pmdb')
-rw-r--r--usr.bin/pmdb/pmdb.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/usr.bin/pmdb/pmdb.c b/usr.bin/pmdb/pmdb.c
index 3f46697dc3f..19303618479 100644
--- a/usr.bin/pmdb/pmdb.c
+++ b/usr.bin/pmdb/pmdb.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pmdb.c,v 1.14 2003/03/29 00:03:00 mickey Exp $ */
+/* $OpenBSD: pmdb.c,v 1.15 2003/04/05 18:16:21 pvalchev Exp $ */
/*
* Copyright (c) 2002 Artur Grabowski <art@openbsd.org>
* All rights reserved.
@@ -135,6 +135,8 @@ main(int argc, char **argv)
asprintf(&prompt_add, "(%d)", level);
asprintf(&pmenv, "%d", level);
setenv("IN_PMDB", pmenv, 1);
+ if (pmenv)
+ free(pmenv);
ps.ps_pid = pid;
ps.ps_state = NONE;