From e7467d86d0219d28df8ee45461b26b2ff133b7a2 Mon Sep 17 00:00:00 2001 From: lum Date: Wed, 28 Mar 2012 17:16:54 +0000 Subject: Close an opendir(). From Igor Zinovik. --- usr.bin/mg/fileio.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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), -- cgit v1.2.3