From 946a10111c27faf372a991d902c2c46ae3194fc2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jind=C5=99ich=20Makovi=C4=8Dka?= Date: Sat, 12 May 2012 12:33:39 +0200 Subject: [PATCH] fix file descriptor leak --- Osmand-kernel/osmand/src/renderRules.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Osmand-kernel/osmand/src/renderRules.cpp b/Osmand-kernel/osmand/src/renderRules.cpp index d3b105cd09..3e6f21beaf 100644 --- a/Osmand-kernel/osmand/src/renderRules.cpp +++ b/Osmand-kernel/osmand/src/renderRules.cpp @@ -390,6 +390,7 @@ void RenderingRulesStorage::parseRulesFromXmlInputStream(const char* filename, R done = true; } if (XML_Parse(parser, buffer, len, done) == XML_STATUS_ERROR) { + fclose(file); return; } } @@ -428,6 +429,7 @@ void RenderingRulesStorage::parseRulesFromXmlInputStream(const char* filename, R } } + fclose(file); }