dtstyle: Coverity 88110
authorPeter Howkins <flibble@users.sf.net>
Tue, 3 Jul 2018 17:57:35 +0000 (18:57 +0100)
committerPeter Howkins <flibble@users.sf.net>
Tue, 3 Jul 2018 17:57:35 +0000 (18:57 +0100)
cde/programs/dtstyle/I18nEnv.c

index b8565a79d8bdca4331e5c4744af2c01a5f9ec2f3..987ecc577af3a6c6d1cda7288779252e8e0ad83a 100644 (file)
@@ -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;
 }