summaryrefslogtreecommitdiff
path: root/usr.bin/mg
diff options
context:
space:
mode:
authorlum <lum@cvs.openbsd.org>2012-03-28 17:16:54 +0000
committerlum <lum@cvs.openbsd.org>2012-03-28 17:16:54 +0000
commite7467d86d0219d28df8ee45461b26b2ff133b7a2 (patch)
tree17819ce335c10c439d2392731a5545ab6e8530ab /usr.bin/mg
parent68415eb28ac6a0b70c99b3a7f01283cfb0180904 (diff)
Close an opendir(). From Igor Zinovik.
Diffstat (limited to 'usr.bin/mg')
-rw-r--r--usr.bin/mg/fileio.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.bin/mg/fileio.c b/usr.bin/mg/fileio.c
index 747eed69fd3..fec2b99fa8d 100644
--- a/usr.bin/mg/fileio.c
+++ b/usr.bin/mg/fileio.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: fileio.c,v 1.85 2011/08/31 08:58:29 lum Exp $ */
+/* $OpenBSD: fileio.c,v 1.86 2012/03/28 17:16:53 lum Exp $ */
/* This file is in the public domain. */
@@ -551,6 +551,7 @@ make_file_list(char *buf)
if ((current = malloc(sizeof(struct list))) == NULL) {
free_file_list(last);
+ closedir(dirp);
return (NULL);
}
ret = snprintf(fl_name, sizeof(fl_name),