summaryrefslogtreecommitdiff
path: root/usr.sbin/pkg_add
diff options
context:
space:
mode:
authorMarc Espie <espie@cvs.openbsd.org>2004-12-20 22:19:25 +0000
committerMarc Espie <espie@cvs.openbsd.org>2004-12-20 22:19:25 +0000
commitdc648ddf57775e3aaca6bbef735474a821d218e9 (patch)
tree4557bfc21b84fd0b6b283be88378ea142e367ff0 /usr.sbin/pkg_add
parent9cfcf4a1ac1182254d10e62602a1eb1b9a14f8fd (diff)
plug more handle leaks.
Diffstat (limited to 'usr.sbin/pkg_add')
-rw-r--r--usr.sbin/pkg_add/pkg_add5
1 files changed, 4 insertions, 1 deletions
diff --git a/usr.sbin/pkg_add/pkg_add b/usr.sbin/pkg_add/pkg_add
index c76037e8ce9..88dc296e314 100644
--- a/usr.sbin/pkg_add/pkg_add
+++ b/usr.sbin/pkg_add/pkg_add
@@ -1,7 +1,7 @@
#! /usr/bin/perl
# ex:ts=8 sw=4:
-# $OpenBSD: pkg_add,v 1.157 2004/12/20 21:31:22 espie Exp $
+# $OpenBSD: pkg_add,v 1.158 2004/12/20 22:19:24 espie Exp $
#
# Copyright (c) 2003-2004 Marc Espie <espie@openbsd.org>
#
@@ -164,6 +164,7 @@ sub pre_add($$)
if (can_install($plist, $state, $handle)) {
return $handle;
} else {
+ $handle->close();
if ($state->{forced}->{kitchensink}) {
$errors = 0;
}
@@ -617,6 +618,7 @@ sub install_package
$handle->{solved_dependencies}, 0)) {
Warn "Can't install $pkg: lib not found $spec\n";
clue($handle->{solved_dependencies});
+ $handle->close();
return () unless $forced{libdepends};
}
}
@@ -627,6 +629,7 @@ sub install_package
$handle->{solved_dependencies}, 1, $extra)) {
Warn "Can't install $pkg: lib not found ", $lib->{name}, "\n";
clue($extra);
+ $handle->close();
return () unless $forced{libdepends};
}
}