Revert "Remove usage of malloc in favor of new"
This reverts commit b992b450093546d275d2da4b544a611700536e29.
The build's address sanitizer is complaining that we're calling delete[] on a 3 byte region allocated with malloc().
Change-Id: I03e667e1b64a9b298607d0709747c02c8f7d0da6
diff --git a/parse_helpers.cpp b/parse_helpers.cpp
index 03c46a7..0aae3a0 100644
--- a/parse_helpers.cpp
+++ b/parse_helpers.cpp
@@ -47,7 +47,7 @@
}
len = end - text;
- char* rv = new char[len + 1];
+ char* rv = (char*)malloc(len + 1);
memcpy(rv, text, len);
rv[len] = '\0';