From 1cec37d918795065ba409fe67a379b7ec12ed057 Mon Sep 17 00:00:00 2001 From: Adam Buchbinder Date: Mon, 23 May 2016 13:16:13 -0700 Subject: [PATCH] Fix a leaked file in HyphTool.cpp. This addresses the following cppcheck reports: [frameworks/minikin/app/HyphTool.cpp:30]: (error) Resource leak: f [frameworks/minikin/app/HyphTool.cpp:32]: (error) Resource leak: f Change-Id: I5113e0a7268bd3a45bf1498fd023042d9dfe2b87 --- engine/src/flutter/app/HyphTool.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/engine/src/flutter/app/HyphTool.cpp b/engine/src/flutter/app/HyphTool.cpp index 730abadcba..b535d9da8f 100644 --- a/engine/src/flutter/app/HyphTool.cpp +++ b/engine/src/flutter/app/HyphTool.cpp @@ -24,6 +24,7 @@ Hyphenator* loadHybFile(const char* fn) { } uint8_t* buf = new uint8_t[size]; size_t read_size = fread(buf, 1, size, f); + fclose(f); if (read_size < size) { fprintf(stderr, "error reading %s\n", fn); delete[] buf;