summaryrefslogtreecommitdiffstats
path: root/lib/libalpm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libalpm')
-rw-r--r--lib/libalpm/util.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/libalpm/util.c b/lib/libalpm/util.c
index 11285896..59861242 100644
--- a/lib/libalpm/util.c
+++ b/lib/libalpm/util.c
@@ -227,6 +227,7 @@ int _alpm_open_archive(alpm_handle_t *handle, const char *path,
{
int fd;
size_t bufsize = ALPM_BUFFER_SIZE;
+ errno = 0;
if((*archive = archive_read_new()) == NULL) {
RET_ERR(handle, ALPM_ERR_LIBARCHIVE, -1);