From 47cc6288c4802723bd979f48e4a62e145db86071 Mon Sep 17 00:00:00 2001 From: Luiss Date: Tue, 7 Apr 2020 10:03:22 +0200 Subject: [PATCH] Fix for MD5 leak bug, issue #7195 --- cores/esp8266/MD5Builder.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/cores/esp8266/MD5Builder.cpp b/cores/esp8266/MD5Builder.cpp index b32693ed73..04af4e841a 100644 --- a/cores/esp8266/MD5Builder.cpp +++ b/cores/esp8266/MD5Builder.cpp @@ -55,6 +55,7 @@ bool MD5Builder::addStream(Stream & stream, const size_t maxLen){ // read data and check if we got something int numBytesRead = stream.readBytes(buf, readBytes); if(numBytesRead< 1) { + free(buf); // release the buffer return false; }