vulkan: Fix leak of error messages

Fixes: 0cad3beb2a ("vulkan/log: Add common vk_error and vk_errorf helpers")
Acked-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14235>
(cherry picked from commit bdb8e615d1)
This commit is contained in:
Emma Anholt 2021-12-16 15:54:02 -08:00 committed by Eric Engestrom
parent 35444289c5
commit d08330e731
2 changed files with 3 additions and 1 deletions

View file

@ -4036,7 +4036,7 @@
"description": "vulkan: Fix leak of error messages",
"nominated": true,
"nomination_type": 1,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": "0cad3beb2a0dda7a8f6c6a1e8c9d253b9c988a9f"
},

View file

@ -305,6 +305,8 @@ __vk_errorv(const void *_obj, VkResult error,
VK_LOG_NO_OBJS(instance), file, line,
"%s (%s)", message, error_str);
}
ralloc_free(message);
} else {
if (object) {
__vk_log(VK_DEBUG_UTILS_MESSAGE_SEVERITY_ERROR_BIT_EXT,