From b1a8ecc98c0f588f86b98d9c0c5751225ce9aaa9 Mon Sep 17 00:00:00 2001 From: Stephen Gallagher Date: Mon, 6 Aug 2012 09:36:07 -0400 Subject: IPA: Do not attempt to close the same file twice https://fedorahosted.org/sssd/ticket/1456 --- src/providers/ipa/ipa_subdomains.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/providers/ipa/ipa_subdomains.c b/src/providers/ipa/ipa_subdomains.c index 3ea8a3175..9adc3fa94 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) { -- cgit