Fix memory leak in __flashString Web sockets implementation. (#136)
This commit is contained in:
parent
3afc669f10
commit
edf6c75f8c
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue