mirror of
https://gitlab.freedesktop.org/mesa/drm.git
synced 2026-05-08 04:38:04 +02:00
libdrm: check for allocation failure
This commit is contained in:
parent
0a45f15066
commit
f9dad8cc22
1 changed files with 3 additions and 0 deletions
|
|
@ -419,6 +419,9 @@ drmModeConnectorPtr drmModeGetConnector(int fd, uint32_t connector_id)
|
|||
r->connector_type = conn.connector_type;
|
||||
r->connector_type_id = conn.connector_type_id;
|
||||
|
||||
if (!r->props || !r->prop_values || !r->modes || !r->encoders)
|
||||
goto err_allocs;
|
||||
|
||||
err_allocs:
|
||||
drmFree(U642VOID(conn.prop_values_ptr));
|
||||
drmFree(U642VOID(conn.props_ptr));
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue