]> git.stg.codes - stg.git/blobdiff - projects/stargazer/plugins/store/files/file_store.cpp
Исправлена утечка ресурса (файловый дескриптор) в плагине store_files.
[stg.git] / projects / stargazer / plugins / store / files / file_store.cpp
index fe5ed230052a1b30aad4e9c40ba8f37197021add..57f825d6e2df91854112a41426460f5add6e3adc 100644 (file)
@@ -1921,6 +1921,7 @@ while (stIter != statTree.end())
         errorStr += strerror(errno);
         errorStr += "'";
         printfd(__FILE__, "FILES_STORE::WriteDetailStat - fprintf failed. Message: '%s'\n", strerror(errno));
+        fclose(statFile);
         return -1;
         }
     #else
@@ -1936,6 +1937,7 @@ while (stIter != statTree.end())
         errorStr += strerror(errno);
         errorStr += "'";
         printfd(__FILE__, "FILES_STORE::WriteDetailStat - fprintf failed. Message: '%s'\n", strerror(errno));
+        fclose(statFile);
         return -1;
         }
     #endif