From b1a8ecc98c0f588f86b98d9c0c5751225ce9aaa9 Mon Sep 17 00:00:00 2001 From: Stephen Gallagher Date: Aug 06 2012 16:12:56 +0000 Subject: IPA: Do not attempt to close the same file twice https://fedorahosted.org/sssd/ticket/1456 --- diff --git a/src/providers/ipa/ipa_subdomains.c b/src/providers/ipa/ipa_subdomains.c index 3ea8a31..9adc3fa 100644 --- a/src/providers/ipa/ipa_subdomains.c +++ b/src/providers/ipa/ipa_subdomains.c @@ -347,13 +347,13 @@ ipa_subdomains_write_mappings(struct sss_domain_info *domain, } ret = fclose(fstream); + fstream = NULL; if (ret != 0) { ret = errno; DEBUG(SSSDBG_CRIT_FAILURE, ("fclose failed [%d][%s].\n", ret, strerror(ret))); goto done; } - fstream = NULL; ret = rename(tmp_file, mapping_file); if (ret == -1) {