Skip to content

Commit 47cc628

Browse files
committed
Fix for MD5 leak bug, issue esp8266#7195
1 parent d600cc7 commit 47cc628

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

cores/esp8266/MD5Builder.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ bool MD5Builder::addStream(Stream & stream, const size_t maxLen){
5555
// read data and check if we got something
5656
int numBytesRead = stream.readBytes(buf, readBytes);
5757
if(numBytesRead< 1) {
58+
free(buf); // release the buffer
5859
return false;
5960
}
6061

0 commit comments

Comments
 (0)