From 9626e6e8e7d33a53b58785233290f400b63e8825 Mon Sep 17 00:00:00 2001 From: Tobias Weimer Date: Wed, 21 Jan 2015 21:21:11 +0000 Subject: Variables: -Minor leaks fixed git-svn-id: http://svn.miranda-ng.org/main/trunk@11892 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/Variables/src/parse_system.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'plugins/Variables/src/parse_system.cpp') diff --git a/plugins/Variables/src/parse_system.cpp b/plugins/Variables/src/parse_system.cpp index 1c888e24f1..b17266b807 100644 --- a/plugins/Variables/src/parse_system.cpp +++ b/plugins/Variables/src/parse_system.cpp @@ -645,8 +645,10 @@ static TCHAR *parseTextFile(ARGUMENTSINFO *ai) } bufSz = TXTFILEBUFSZ*csz; pBuf = (PBYTE)mir_calloc(bufSz); - if (pBuf == NULL) + if (pBuf == NULL) { + CloseHandle(hFile); return NULL; + } // count number of lines do { -- cgit v1.2.3