mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 20:18:12 +02:00
xlib: use XMesaDestroyVisual instead of manual free
Replace it with XMesaDestroyVisual() to properly handle deallocation. Related: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14947 Reviewed-by: Adam Jackson <ajax@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40422>
This commit is contained in:
parent
8131af3f77
commit
61d1e8fc85
1 changed files with 1 additions and 2 deletions
|
|
@ -874,8 +874,7 @@ XMesaVisual XMesaCreateVisual( Display *display,
|
|||
v->stvis.color_format = PIPE_FORMAT_NONE;
|
||||
|
||||
if (v->stvis.color_format == PIPE_FORMAT_NONE) {
|
||||
free(v->visinfo);
|
||||
free(v);
|
||||
XMesaDestroyVisual(v);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue