summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgraham.gower <graham.gower@e8e0d7a0-c8d9-11dd-a880-a1081c7ac358>2010-01-11 23:52:37 (EST)
committer graham.gower <graham.gower@e8e0d7a0-c8d9-11dd-a880-a1081c7ac358>2010-01-11 23:52:37 (EST)
commite530e023db675648bc8dfbdd415ba9776bb453ca (patch)
tree28179b030e740b81dafd7be0c1dea70165edb816
parente0108bbf815b1806c96e3cbdc2a2dc162f7c1fe1 (diff)
Don't try to close the file if its not open.
git-svn-id: http://opkg.googlecode.com/svn/trunk@517 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
-rw-r--r--libopkg/opkg_conf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libopkg/opkg_conf.c b/libopkg/opkg_conf.c
index bcc79ed..678f219 100644
--- a/libopkg/opkg_conf.c
+++ b/libopkg/opkg_conf.c
@@ -376,7 +376,7 @@ opkg_conf_write_status_files(void)
list_for_each_entry(iter, &conf->pkg_dest_list.head, node) {
dest = (pkg_dest_t *)iter->data;
- if (fclose(dest->status_fp) == EOF) {
+ if (dest->status_fp && fclose(dest->status_fp) == EOF) {
opkg_perror(ERROR, "Couldn't close %s", dest->status_file_name);
ret = -1;
}