summaryrefslogtreecommitdiffstats
path: root/parse_helpers.cpp
diff options
context:
space:
mode:
authorChristopher Wiley <wiley@google.com>2015-09-29 16:08:57 +0000
committerChristopher Wiley <wiley@google.com>2015-09-29 16:09:47 +0000
commitb2116869ba878222d607807be594366b6e9392f7 (patch)
treed5e735566facd5a4a6e394a2c39b1eeca6504fe0 /parse_helpers.cpp
parent3eb4a42fcc3d15df0cd9a0938003546f4d0f4ed3 (diff)
downloadandroid_system_tools_aidl-b2116869ba878222d607807be594366b6e9392f7.tar.gz
android_system_tools_aidl-b2116869ba878222d607807be594366b6e9392f7.tar.bz2
android_system_tools_aidl-b2116869ba878222d607807be594366b6e9392f7.zip
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
Diffstat (limited to 'parse_helpers.cpp')
-rw-r--r--parse_helpers.cpp2
1 files changed, 1 insertions, 1 deletions
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 @@ char* parse_import_statement(const char* text) {
}
len = end - text;
- char* rv = new char[len + 1];
+ char* rv = (char*)malloc(len + 1);
memcpy(rv, text, len);
rv[len] = '\0';