UPSTREAM: util: Fixes memory leak in create_cache_item_header_and_blob

stack-trace by asan
Direct leak of 238 byte(s) in 6 object(s) allocated from:
    #0 0x7f101e1dbe8f in __interceptor_malloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:145
    #1 0x55ce3a959e2c in create_cache_item_header_and_blob ../src/util/disk_cache_os.c:647
    #2 0x55ce3a95c217 in disk_cache_write_item_to_disk_foz ../src/util/disk_cache_os.c:967
    #3 0x55ce3a97bce1 in util_queue_thread_func ../src/util/u_queue.c:306
    #4 0x55ce3a989c3b in impl_thrd_routine ../src/c11/impl/threads_posix.c:67
    #5 0x7f101ddc7ea6 in start_thread nptl/pthread_create.c:477

Fixes: 2a9b4ad1774 ("util/disk_cache: Add option to disable compression")

Cc: mesa-stable

(cherry picked from commit 11ab6087797f805cf158048915c67945613c9a72)

BUG=b:245831076
TEST=N/A, bug fix for the first commit of mesa-db MR

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18024>
Change-Id: Iece657bde97c19efc09ccad126ef0812a5b823d6
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/mesa/+/3893169
Reviewed-by: Sean Paul <sean@poorly.run>
Tested-by: Max Lee <endlesspring@google.com>
Commit-Queue: Max Lee <endlesspring@google.com>
Reviewed-by: Ilja Friedel <ihf@chromium.org>
1 file changed