Summary Files Commits Branches @commit @diff @stats
path: root / src / frame.cpp
diff options
context:
space:
mode:
Commitbef1b7e46471f1668d2c84380ef685a15defe06a (patch)
Author
 Syndamia <kamen@syndamia.com>
2025-07-03 14:55:34 +0300
Committer
 Syndamia <kamen@syndamia.com>
2025-07-03 14:55:34 +0300
Files410d72ceaa8987cfa868ffe64d94611a9b218be0 /src/frame.cpp
iso-tp-parser-carista-bef1b7e46471f1668d2c84380ef685a15defe06a.tar
iso-tp-parser-carista-bef1b7e46471f1668d2c84380ef685a15defe06a.tar.gz
iso-tp-parser-carista-bef1b7e46471f1668d2c84380ef685a15defe06a.zip
Parent847a5544652b380b9393ff1b1ec2373de190d4f3 (diff)
fix: Replace mallocs with new
1 files changed, 1 insertions, 1 deletions
-rw-r--r--src/frame.cpp2
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);
}