UPSTREAM: util/romcc: Fix resource leak
Change-Id: I0d260254bab714ec939fc199b3a133b0fc05b10d Original-Signed-off-by: Patrick Georgi <pgeorgi@chromium.org> Original-Found-by: Coverity Scan #1129112 Original-Reviewed-on: https://review.coreboot.org/17883 Original-Tested-by: build bot (Jenkins) Original-Reviewed-by: Martin Roth <martinroth@google.com> Signed-off-by: Aaron Durbin <adurbin@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/421217 Reviewed-by: Patrick Georgi <pgeorgi@chromium.org>
This commit is contained in:
parent
02ba75a7c6
commit
7c655b3316
1 changed files with 1 additions and 0 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue