lib/repo.c: CID 62706 (argument cannot be negative)

This commit is contained in:
Juan RP 2014-10-07 07:27:45 +02:00
parent 960c3fdcdf
commit 9fc6c9d70e

View File

@ -196,7 +196,7 @@ xbps_repo_open(struct xbps_handle *xhp, const char *url, bool lock)
out:
if (repo->ar)
archive_read_free(repo->ar);
if (repo->fd)
if (repo->fd != -1)
close(repo->fd);
free(repofile);
free(repo);