Fixes https://fedorahosted.org/sssd/ticket/1456

From 66d82ac7f563d8ca1cf213eb360a6bf388f1cbb7 Mon Sep 17 00:00:00 2001
From: Stephen Gallagher <sgall...@redhat.com>
Date: Mon, 6 Aug 2012 09:36:07 -0400
Subject: [PATCH] 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 3ea8a3175f862ec6ecc2cdede17bb29483b7047e..9adc3fa947d5d1a37eaf8e261d14ccc01d733fd2 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) {
-- 
1.7.11.2

Attachment: signature.asc
Description: This is a digitally signed message part

_______________________________________________
sssd-devel mailing list
sssd-devel@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/sssd-devel

Reply via email to