mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-09-12 18:50:22 -07:00
vkd3d-shader/spirv: Take ownership of the shader signatures in spirv_compiler_create().
Fixes leakage of the replacement elements in shader_signature_merge().
This commit is contained in:
committed by
Alexandre Julliard
parent
df0a031ad8
commit
bce2a898b3
Notes:
Alexandre Julliard
2023-06-19 23:03:34 +02:00
Approved-by: Giovanni Mascellani (@giomasce) Approved-by: Henri Verbeet (@hverbeet) Approved-by: Alexandre Julliard (@julliard) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/238
@@ -715,8 +715,7 @@ static bool shader_signature_merge(struct shader_signature *s, uint8_t range_map
|
||||
}
|
||||
}
|
||||
element_count = new_count;
|
||||
/* Signature 's' is a copy of the original signature struct, so we can replace
|
||||
* the 'elements' pointer without freeing it. */
|
||||
vkd3d_free(s->elements);
|
||||
s->elements = elements;
|
||||
s->element_count = element_count;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user