Fix memory leak in __flashString Web sockets implementation. (#136)

This commit is contained in:
sticilface 2017-03-05 18:07:17 +00:00 committed by Me No Dev
parent 3afc669f10
commit edf6c75f8c
1 changed files with 2 additions and 0 deletions

View File

@ -531,6 +531,7 @@ void AsyncWebSocketClient::text(const __FlashStringHelper *data){
message[b] = pgm_read_byte(p++);
message[n] = 0;
text(message, n);
free(message);
}
}
@ -556,6 +557,7 @@ void AsyncWebSocketClient::binary(const __FlashStringHelper *data, size_t len){
for(size_t b=0; b<len; b++)
message[b] = pgm_read_byte(p++);
binary(message, len);
free(message);
}
}