Fix uninitialized pointer dereference in media_device_add_entity
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Fri, 30 May 2014 15:13:41 +0000 (17:13 +0200)
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Fri, 30 May 2014 15:13:41 +0000 (17:13 +0200)
commit114c1b274edc40e07e9b99a435d26438f5b99943
tree8d17f48960a9d5f21900264d34c6d3d8d62880d3
parente13967d6479ead0be90fa241feb52a776b8481dc
Fix uninitialized pointer dereference in media_device_add_entity

When the entity being added has the default flag set, the function tries
to set the entity as the default entity for its type by storing the
entity pointer in the appropriate default entity field. If the entity
type isn't recognized, the default entity pointer is left uninitialized,
leading to a crash. Fix it.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
src/mediactl.c