diff options
author | Patrick Georgi <pgeorgi@chromium.org> | 2016-12-15 15:12:16 +0100 |
---|---|---|
committer | Patrick Georgi <pgeorgi@google.com> | 2016-12-16 15:56:50 +0100 |
commit | f23cba082c86bd7dd33ea3c26057206d790b3dab (patch) | |
tree | 544f1d40926120628265cfb4541795441373d3ff /util | |
parent | 8c47b1f833cf83c635bdb04f3c6c363bdc3e6669 (diff) |
util/romcc: Fix resource leak
Change-Id: I0d260254bab714ec939fc199b3a133b0fc05b10d
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Found-by: Coverity Scan #1129112
Reviewed-on: https://review.coreboot.org/17883
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth@google.com>
Diffstat (limited to 'util')
-rw-r--r-- | util/romcc/romcc.c | 1 |
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); |