summaryrefslogtreecommitdiffstats
path: root/usr.bin/grep
diff options
context:
space:
mode:
authoruebayasi <uebayasi@openbsd.org>2015-06-25 02:04:07 +0000
committeruebayasi <uebayasi@openbsd.org>2015-06-25 02:04:07 +0000
commitf12e5d267fa16ace667943cdc0aa0c4c4112d6cf (patch)
tree440f37940ad1de54148c8f531e626c31a39ed119 /usr.bin/grep
parentyou need to include ddb/db_output.h so you know how to call db_printf (diff)
downloadwireguard-openbsd-f12e5d267fa16ace667943cdc0aa0c4c4112d6cf.tar.xz
wireguard-openbsd-f12e5d267fa16ace667943cdc0aa0c4c4112d6cf.zip
Put fts_close() where missing.
Not bugs in short-lived commands that call exit() -> _exit() immediately, but for idempotency. Originally found in ls(1) by Valgrind. Changes for other commands are from deraadt@. Reviewed by me, tested in snapshots. OK deraadt@
Diffstat (limited to 'usr.bin/grep')
-rw-r--r--usr.bin/grep/util.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/grep/util.c b/usr.bin/grep/util.c
index c4b945d4b36..39afe182dd4 100644
--- a/usr.bin/grep/util.c
+++ b/usr.bin/grep/util.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: util.c,v 1.49 2014/12/01 06:36:04 deraadt Exp $ */
+/* $OpenBSD: util.c,v 1.50 2015/06/25 02:04:08 uebayasi Exp $ */
/*-
* Copyright (c) 1999 James Howard and Dag-Erling Coïdan Smørgrav
@@ -85,7 +85,7 @@ grep_tree(char **argv)
}
if (errno)
err(2, "fts_read");
-
+ fts_close(fts);
return c;
}