use delete[] to avoid leaking memory (#4883)

This commit is contained in:
Jonathan Bennett 2024-09-27 14:55:55 -05:00 committed by GitHub
parent ae14ca7870
commit ef223b1195
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -68,7 +68,7 @@ void printBytes(const char *label, const uint8_t *p, size_t numbytes)
snprintf(messageBuffer + labelSize + i * 3, 4, " %02x", p[i]);
strcpy(messageBuffer + labelSize + numbytes * 3, "\n");
LOG_DEBUG(messageBuffer);
delete messageBuffer;
delete[] messageBuffer;
}
}