Fix Svace alarm
authorjh5.cho <jh5.cho@samsung.com>
Mon, 28 Dec 2015 05:35:15 +0000 (14:35 +0900)
committerjh5.cho <jh5.cho@samsung.com>
Mon, 28 Dec 2015 05:35:15 +0000 (14:35 +0900)
  - Disassociate the returned file pointer by calling fclose

common/resource_manager.cc

index 4d5f7b0553531bc2d7d333d99e90d7d262d02837..349a38fe4c9d9f705a50a1ce4ba96d7ca87e5b11 100644 (file)
@@ -590,6 +590,7 @@ std::string ResourceManager::DecryptResource(const std::string& path) {
   int ret = ftell(src);
   if (ret < 0) {
     LOGGER(ERROR) << "Cannot get filesize of " << src_path;
+    fclose(src);
     return path;
   } else {
     src_len = static_cast<size_t>(ret);