mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 09:38:07 +02:00
u_dynarray: fix coverity warning about ignoring return value from reralloc
>>> Ignoring storage allocated by "reralloc_size(buf->mem_ctx, buf->data, buf->size)" leaks it. Reviewed-by: Thomas Helland<thomashelland90@gmail.com> Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
This commit is contained in:
parent
53587b7105
commit
ca69b5e78c
1 changed files with 1 additions and 1 deletions
|
|
@ -107,7 +107,7 @@ util_dynarray_trim(struct util_dynarray *buf)
|
|||
if (buf->size != buf->capacity) {
|
||||
if (buf->size) {
|
||||
if (buf->mem_ctx) {
|
||||
reralloc_size(buf->mem_ctx, buf->data, buf->size);
|
||||
buf->data = reralloc_size(buf->mem_ctx, buf->data, buf->size);
|
||||
} else {
|
||||
buf->data = realloc(buf->data, buf->size);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue