From bef1b7e46471f1668d2c84380ef685a15defe06a Mon Sep 17 00:00:00 2001 From: Syndamia Date: Thu, 3 Jul 2025 14:55:34 +0300 Subject: fix: Replace mallocs with new --- src/frame.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/frame.cpp') diff --git a/src/frame.cpp b/src/frame.cpp index 9844099..05ec58d 100644 --- a/src/frame.cpp +++ b/src/frame.cpp @@ -51,7 +51,7 @@ void Frame::parse_frame_str(const unsigned char* iso_tp_frame) { break; } - this->data = (unsigned char*)malloc(sizeof(unsigned char) * this->data_size); + this->data = new unsigned char[this->data_size]; for (int i = 0; i < this->data_size; ++i) { this->data[i] = next_hex_byte(iso_tp_frame); } -- cgit v1.3.1-23-gd82d