summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2010-03-22 17:04:03 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2010-03-22 17:04:03 +0000
commit7c1cfcb5053598a05715c2e280388306bf1ca859 (patch)
tree1dc03bf77279f0054e7e0b53e87ea89f0bb68892
parenta62a57208a49016a0ccc40f89152da2433bbeb9d (diff)
Following diff fixes memory leak. `debug' is allocated via asprintf(3) so we
need to free it with free(3). from zinovik
-rw-r--r--sbin/pfctl/pfctl_parser.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sbin/pfctl/pfctl_parser.c b/sbin/pfctl/pfctl_parser.c
index 2e3538b76e1..648a82b5475 100644
--- a/sbin/pfctl/pfctl_parser.c
+++ b/sbin/pfctl/pfctl_parser.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pfctl_parser.c,v 1.263 2010/03/18 12:15:22 sthen Exp $ */
+/* $OpenBSD: pfctl_parser.c,v 1.264 2010/03/22 17:04:02 deraadt Exp $ */
/*
* Copyright (c) 2001 Daniel Hartmeier
@@ -528,6 +528,7 @@ print_status(struct pf_status *s, int opts)
printf("%-44s", statline);
asprintf(&debug, "Debug: %s", loglevel_to_string(s->debug));
printf("%15s\n\n", debug);
+ free(debug);
if (opts & PF_OPT_VERBOSE) {
printf("Hostid: 0x%08x\n", ntohl(s->hostid));