Skip to content

Commit 082ec69

Browse files
committed
Remove free() when using static certificate arrays
1 parent 7f8903c commit 082ec69

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

Firmware/RTK_Surveyor/menuPP.ino

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -322,8 +322,8 @@ bool updatePointPerfectKeys()
322322
if (tries++ == maxTries)
323323
{
324324
log_d("MQTT failed to connect");
325-
free(certificateContents);
326-
free(keyContents);
325+
//free(certificateContents);
326+
//free(keyContents);
327327
return (false);
328328
}
329329

@@ -344,8 +344,8 @@ bool updatePointPerfectKeys()
344344
if (mqttClient.connected() == false)
345345
{
346346
log_d("Client disconnected");
347-
free(certificateContents);
348-
free(keyContents);
347+
//free(certificateContents);
348+
//free(keyContents);
349349
return (false);
350350
}
351351

@@ -355,16 +355,16 @@ bool updatePointPerfectKeys()
355355
{
356356
Serial.println();
357357
log_d("Channel failed to respond");
358-
free(certificateContents);
359-
free(keyContents);
358+
//free(certificateContents);
359+
//free(keyContents);
360360
return (false);
361361
}
362362
}
363363

364364
Serial.println();
365365
Serial.println("Keys successfully updated");
366-
free(certificateContents);
367-
free(keyContents);
366+
//free(certificateContents);
367+
//free(keyContents);
368368
return (true);
369369
#else
370370
return (false);

0 commit comments

Comments
 (0)