Fix file descriptor leak in read_buildinfo() which caused one leaked
descriptor per package inspected. 'pkg_add *' in a large directory now works. Update PKGTOOLS_VERSION to "20040410"
This commit is contained in:
parent
144cb3e439
commit
0be46fce4e
|
@ -1,11 +1,11 @@
|
|||
/* $NetBSD: perform.c,v 1.96 2004/04/09 18:27:48 tv Exp $ */
|
||||
/* $NetBSD: perform.c,v 1.97 2004/04/10 09:10:17 abs Exp $ */
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
#ifndef lint
|
||||
#if 0
|
||||
static const char *rcsid = "from FreeBSD Id: perform.c,v 1.44 1997/10/13 15:03:46 jkh Exp";
|
||||
#else
|
||||
__RCSID("$NetBSD: perform.c,v 1.96 2004/04/09 18:27:48 tv Exp $");
|
||||
__RCSID("$NetBSD: perform.c,v 1.97 2004/04/10 09:10:17 abs Exp $");
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
@ -960,6 +960,7 @@ read_buildinfo(char **buildinfo)
|
|||
buildinfo[BI_MACHINE_ARCH] = strdup(line);
|
||||
}
|
||||
}
|
||||
fclose(fp);
|
||||
if (buildinfo[BI_OPSYS] == NULL ||
|
||||
buildinfo[BI_OS_VERSION] == NULL ||
|
||||
buildinfo[BI_MACHINE_ARCH] == NULL) {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: version.h,v 1.46 2004/04/09 18:36:08 tv Exp $ */
|
||||
/* $NetBSD: version.h,v 1.47 2004/04/10 09:10:17 abs Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2001 Thomas Klausner. All rights reserved.
|
||||
|
@ -33,6 +33,6 @@
|
|||
#ifndef _INST_LIB_VERSION_H_
|
||||
#define _INST_LIB_VERSION_H_
|
||||
|
||||
#define PKGTOOLS_VERSION "20040409"
|
||||
#define PKGTOOLS_VERSION "20040410"
|
||||
|
||||
#endif /* _INST_LIB_VERSION_H_ */
|
||||
|
|
Loading…
Reference in New Issue