summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorespie <espie@openbsd.org>2016-10-05 13:50:20 +0000
committerespie <espie@openbsd.org>2016-10-05 13:50:20 +0000
commit643a5bfc5777297ddb62e8b08bfa8cb98b2e9ee9 (patch)
treeab84a364b205cc719f9cfa9307ae5f777260b718
parentWrap some long lines in screen-write.c. (diff)
downloadwireguard-openbsd-643a5bfc5777297ddb62e8b08bfa8cb98b2e9ee9.tar.xz
wireguard-openbsd-643a5bfc5777297ddb62e8b08bfa8cb98b2e9ee9.zip
getting errors is trivial, just don't forget to close the handle and not
return anything in case signature did fail.
-rw-r--r--usr.sbin/pkg_add/OpenBSD/PackageRepository.pm5
1 files changed, 4 insertions, 1 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/PackageRepository.pm b/usr.sbin/pkg_add/OpenBSD/PackageRepository.pm
index a616fd09db0..025ff2d7829 100644
--- a/usr.sbin/pkg_add/OpenBSD/PackageRepository.pm
+++ b/usr.sbin/pkg_add/OpenBSD/PackageRepository.pm
@@ -1,5 +1,5 @@
# ex:ts=8 sw=4:
-# $OpenBSD: PackageRepository.pm,v 1.137 2016/10/04 14:46:13 espie Exp $
+# $OpenBSD: PackageRepository.pm,v 1.138 2016/10/05 13:50:20 espie Exp $
#
# Copyright (c) 2003-2010 Marc Espie <espie@openbsd.org>
#
@@ -389,6 +389,9 @@ sub uncompress
$result .= "\@digital-signature signify2:$1:external\n";
}
}
+ } else {
+ $fh->close;
+ return undef;
}
}
$object->{extra_content} = $result;