Permalink
Browse files

Close the correct file when using a metalink.xml file

When using librepo, PackageKit crashes after after issuing a few hundred
transactions with 'Too many open files' -- Sure enough, looking at the output
of lsof before it crashes, I have hundreds of open files to various metalink.xml
files.

Fix the typo so that the metalink file descriptor actually gets closed.
  • Loading branch information...
1 parent 6a09d9a commit b83963e180e32e7ba3076714fb56835812c2f8cc @hughsie hughsie committed Dec 4, 2013
Showing with 1 addition and 1 deletion.
  1. +1 −1 librepo/handle.c
View
@@ -110,7 +110,7 @@ lr_handle_free(LrHandle *handle)
if (handle->mirrorlist_fd != -1)
close(handle->mirrorlist_fd);
if (handle->metalink_fd != -1)
- close(handle->mirrorlist_fd);
+ close(handle->metalink_fd);
lr_handle_free_list(&handle->urls);
lr_free(handle->fastestmirrorcache);
lr_free(handle->mirrorlist);

0 comments on commit b83963e

Please sign in to comment.