summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--util/romcc/romcc.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/util/romcc/romcc.c b/util/romcc/romcc.c
index c97312cc44..9a9016741f 100644
--- a/util/romcc/romcc.c
+++ b/util/romcc/romcc.c
@@ -10779,6 +10779,7 @@ static struct triple *string_constant(struct compile_state *state)
ptr = buf;
buf = xmalloc(type->elements + str_len + 1, "string_constant");
memcpy(buf, ptr, type->elements);
+ free(ptr);
ptr = buf + type->elements;
do {
*ptr++ = char_value(state, &str, end);