diff options
author | 2016-10-05 13:50:20 +0000 | |
---|---|---|
committer | 2016-10-05 13:50:20 +0000 | |
commit | 643a5bfc5777297ddb62e8b08bfa8cb98b2e9ee9 (patch) | |
tree | ab84a364b205cc719f9cfa9307ae5f777260b718 | |
parent | Wrap some long lines in screen-write.c. (diff) | |
download | wireguard-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.pm | 5 |
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; |