From 25e371dbe2c590b9bfa98c81abee9da6980035ce Mon Sep 17 00:00:00 2001 From: Peter Howkins Date: Tue, 3 Jul 2018 18:57:35 +0100 Subject: [PATCH] dtstyle: Coverity 88110 --- cde/programs/dtstyle/I18nEnv.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/cde/programs/dtstyle/I18nEnv.c b/cde/programs/dtstyle/I18nEnv.c index b8565a79..987ecc57 100644 --- a/cde/programs/dtstyle/I18nEnv.c +++ b/cde/programs/dtstyle/I18nEnv.c @@ -239,7 +239,7 @@ GetUserIMSelectionFile( ) { int ret = NoError; - FILE *fp; + FILE *fp = NULL; ret = GetUserFileName(env); @@ -253,7 +253,11 @@ GetUserIMSelectionFile( start_tag_line(env->file_sel->fname); ret = ReadImSelectionFile(env->file_sel, fp); - + + if(fp) { + fclose(fp); + } + return ret; } -- 2.25.1