diff --git a/libgrust/libproc_macro/literal.cc b/libgrust/libproc_macro/literal.cc index 221c57a0da5..d4977533a90 100644 --- a/libgrust/libproc_macro/literal.cc +++ b/libgrust/libproc_macro/literal.cc @@ -32,11 +32,11 @@ Literal::drop (Literal *lit) switch (lit->tag) { case STRING: - delete lit->payload.string_payload.data; + delete[] lit->payload.string_payload.data; lit->payload.string_payload.len = 0; break; case BYTE_STRING: - delete lit->payload.byte_string_payload.data; + delete[] lit->payload.byte_string_payload.data; lit->payload.byte_string_payload.size = 0; break; case CHAR: