From 90b01aab656b7b9e521ed9982a09b2a7bebb78e8 Mon Sep 17 00:00:00 2001 From: Cristy Date: Sat, 30 Sep 2017 11:47:42 -0400 Subject: [PATCH] ... --- coders/emf.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/coders/emf.c b/coders/emf.c index d4d713005..ca479ec67 100644 --- a/coders/emf.c +++ b/coders/emf.c @@ -409,7 +409,10 @@ static HENHMETAFILE ReadEnhMetaFile(const char *path,ssize_t *width, dwSize=GetFileSize(hFile,NULL); pBits=(LPBYTE) AcquireQuantumMemory(dwSize,sizeof(*pBits)); if (pBits == (LPBYTE) NULL) - return(NULL); + { + CloseHandle(hFile); + return((HENHMETAFILE) NULL); + } ReadFile(hFile,pBits,dwSize,&dwSize,NULL); CloseHandle(hFile); if (((PAPMHEADER) pBits)->dwKey != 0x9ac6cdd7l) -- 2.40.0