Skip to content

Commit

Permalink
fix pointer returned from a mismatched allocation function
Browse files Browse the repository at this point in the history
  • Loading branch information
tobozo committed Oct 12, 2023
1 parent a22510f commit ef82b3a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions examples/Test_tar_gz_tgz/test_tools.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,14 @@ extern "C" {

#endif
#if defined ESP32
#if defined ESP_IDF_VERSION_MAJOR && ESP_IDF_VERSION_MAJOR >= 4
#if defined ESP_IDF_VERSION_MAJOR && ESP_IDF_VERSION_MAJOR >= 4 && ESP_IDF_VERSION_MAJOR < 5
#include <esp32/rom/rtc.h>
#else
#include <rom/rtc.h>
#endif
#endif

#pragma GCC diagnostic ignored "-Wswitch"

bool isManualReset()
{
Expand Down Expand Up @@ -89,7 +90,7 @@ void SerialPrintCentered(const char *s, bool open = false, bool close = false )
if( open ) Serial.println( OpenLine );
Serial.println( out );
if( close ) Serial.println( CloseLine );
delete out;
delete[] out;
}

void SerialPrintfCentered(const char* format, ... )
Expand Down

0 comments on commit ef82b3a

Please sign in to comment.