From: Peter Howkins Date: Tue, 3 Jul 2018 17:57:35 +0000 (+0100) Subject: dtstyle: Coverity 88110 X-Git-Tag: 2.3.0a~225 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=25e371dbe2c590b9bfa98c81abee9da6980035ce;p=oweals%2Fcde.git dtstyle: Coverity 88110 --- 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; }