diff options
author | Marc Espie <espie@cvs.openbsd.org> | 2016-10-05 13:50:21 +0000 |
---|---|---|
committer | Marc Espie <espie@cvs.openbsd.org> | 2016-10-05 13:50:21 +0000 |
commit | cc03147f0f995862f2fcd8043493f0b48b843b0a (patch) | |
tree | dbf86b60ae2d36087c1e245c79edc779f32923e1 | |
parent | f3a4d0306de3f83a21b7dc63687879e660cb1871 (diff) |
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; |