mirror of
https://github.com/letscontrolit/ESPEasy.git
synced 2026-10-26 22:10:45 +00:00
[P163] Fix double-free after failed RadSens initialization
This commit is contained in:
1 parent
2164531742
commit
646a95bf5b
1 file changed
+1
@@ -39,6 +39,7 @@ bool P163_data_struct::init(struct EventStruct *event) {
|
||||
}
|
||||
} else {
|
||||
delete sensor; // Clean up if initialization fails
|
||||
sensor = nullptr;
|
||||
addLog(LOG_LEVEL_ERROR, F("RadSens: Initialization failed!"));
|
||||
}
|
||||
return isInitialized();
|
||||
|
||||
Reference in new issue
Block a user