Skip to content

Commit 0095ee6

Browse files
committed
Properly initialize null objects
1 parent 0d2de97 commit 0095ee6

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

CompostaUSBBridge/at_handler.cpp

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,14 @@ CAtHandler::CAtHandler(HardwareSerial *s) {
8181
serverWiFi[i] = nullptr;
8282
}
8383

84-
85-
84+
for(int i = 0; i < MAX_UDP_AVAILABLE; i++) {
85+
udps[i] = nullptr;
86+
}
87+
88+
for(int i = 0; i < MAX_CLIENT_AVAILABLE; i++) {
89+
sslclients[i] = nullptr;
90+
}
91+
8692
/* set up serial */
8793
serial = s;
8894

0 commit comments

Comments
 (0)