Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
arduino-esp32
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
xpstem
arduino-esp32
Commits
b3ba80d5
Commit
b3ba80d5
authored
Sep 22, 2019
by
lbernstone
Committed by
Me No Dev
Sep 22, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
nvs_handle is an int, was assigning NULL. Also cleaned up end to ensure no memory leak. (#3246)
parent
a5935ce1
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
4 deletions
+7
-4
libraries/EEPROM/src/EEPROM.cpp
libraries/EEPROM/src/EEPROM.cpp
+7
-4
No files found.
libraries/EEPROM/src/EEPROM.cpp
View file @
b3ba80d5
...
...
@@ -29,7 +29,7 @@
#include <esp_log.h>
EEPROMClass
::
EEPROMClass
(
void
)
:
_handle
(
NULL
)
:
_handle
(
0
)
,
_data
(
0
)
,
_size
(
0
)
,
_dirty
(
false
)
...
...
@@ -40,7 +40,7 @@ EEPROMClass::EEPROMClass(void)
EEPROMClass
::
EEPROMClass
(
uint32_t
sector
)
// Only for compatiility, no sectors in nvs!
:
_handle
(
NULL
)
:
_handle
(
0
)
,
_data
(
0
)
,
_size
(
0
)
,
_dirty
(
false
)
...
...
@@ -50,7 +50,7 @@ EEPROMClass::EEPROMClass(uint32_t sector)
}
EEPROMClass
::
EEPROMClass
(
const
char
*
name
,
uint32_t
user_defined_size
)
:
_handle
(
NULL
)
:
_handle
(
0
)
,
_data
(
0
)
,
_size
(
0
)
,
_dirty
(
false
)
...
...
@@ -60,7 +60,7 @@ EEPROMClass::EEPROMClass(const char* name, uint32_t user_defined_size)
}
EEPROMClass
::~
EEPROMClass
()
{
//
end();
end
();
}
bool
EEPROMClass
::
begin
(
size_t
size
)
{
...
...
@@ -152,6 +152,9 @@ void EEPROMClass::end() {
}
_data
=
0
;
_size
=
0
;
nvs_close
(
_handle
);
_handle
=
0
;
}
uint8_t
EEPROMClass
::
read
(
int
address
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment