From 2edb9310dc5cc7fb4a61a7d82066e7e8ece40922 Mon Sep 17 00:00:00 2001 From: Tomas Mlcoch Date: Thu, 22 Mar 2012 10:48:00 +0100 Subject: [PATCH] Fix possible fclose(NULL) --- src/createrepo_c.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/createrepo_c.c b/src/createrepo_c.c index a882def..c1ef5b0 100644 --- a/src/createrepo_c.c +++ b/src/createrepo_c.c @@ -713,10 +713,10 @@ int main(int argc, char **argv) { FILE *frepomd = fopen(repomd_path, "w"); if (frepomd && repomd_res->repomd_xml) { fputs(repomd_res->repomd_xml, frepomd); + fclose(frepomd); } else { g_critical("Generate of repomd.xml failed"); } - fclose(frepomd); free_repomdresult(repomd_res); g_free(repomd_path); -- 2.7.4