mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2026-05-07 14:28:05 +02:00
modesetting: avoid double free if AddResource fails
ms_dri2_frame_event_client_gone or ms_dri2_frame_event_drawable_gone
already free the resource.
Reviewed-by: Rémi Cardona <remi@gentoo.org>
Signed-off-by: Julien Cristau <jcristau@debian.org>
(cherry picked from commit acf263df81)
This commit is contained in:
parent
8616bd95de
commit
4bbaffc813
1 changed files with 1 additions and 3 deletions
|
|
@ -97,10 +97,8 @@ ms_get_resource(XID id, RESTYPE type)
|
|||
if (resource == NULL)
|
||||
return NULL;
|
||||
|
||||
if (!AddResource(id, type, resource)) {
|
||||
free(resource);
|
||||
if (!AddResource(id, type, resource))
|
||||
return NULL;
|
||||
}
|
||||
|
||||
resource->id = id;
|
||||
resource->type = type;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue