summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaarten Maathuis <madman2003@gmail.com>2008-06-23 21:15:54 +0200
committerMaarten Maathuis <madman2003@gmail.com>2008-06-23 21:15:54 +0200
commitf9dad8cc22994e0e4671d14b3ee721e4b5777a68 (patch)
tree668a3f111f9152e6b4111b3491facb020d8b65cd
parent0a45f150669eaa2737d7485c9b68ea4c483f3048 (diff)
libdrm: check for allocation failure
-rw-r--r--libdrm/xf86drmMode.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libdrm/xf86drmMode.c b/libdrm/xf86drmMode.c
index a393f965..df865415 100644
--- a/libdrm/xf86drmMode.c
+++ b/libdrm/xf86drmMode.c
@@ -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));