Skip to content

Commit f37e0db

Browse files
authored
avoid leak
do not reallocate buffers in begin, but delete them in the destructor.
1 parent f3be6e0 commit f37e0db

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/SparkFun_u-blox_SARA-R5_Arduino_Library.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ SARA_R5::SARA_R5(int powerPin, int resetPin, uint8_t maxInitTries)
5555
_saraResponseBacklog = NULL;
5656
}
5757

58-
~SARA_R5() {
58+
SARA_R5::~SARA_R5(void) {
5959
if (NULL != _saraRXBuffer) {
6060
delete [] _saraRXBuffer;
6161
_saraRXBuffer = NULL;

0 commit comments

Comments
 (0)