xreef / EMailSender

Arduino, esp32, Esp8266 EMailSender with Arduino IDE, simple library to send email via smtp with attachments.
https://www.mischianti.org/category/my-libraries/emailsender-send-email-with-attachments/
MIT License
74 stars 26 forks source link

Memory leak when using SASLLogin #48

Open opensprinklershop opened 3 weeks ago

opensprinklershop commented 3 weeks ago

When you set setSASLLogin( true ); a memory leak opens: The cause is, there is a malloc( size ) , but no free:


      if (this->isSASLLogin == true){

          int size = 1 + strlen(this->email_login)+ strlen(this->email_password)+2;
          char * logPass = (char *) malloc(size);
....
  }
}