Avoid memory leak in ddc resort() if find_header() fails
authorAlan Coopersmith <alan.coopersmith@oracle.com>
Sun, 27 Jan 2013 23:42:02 +0000 (15:42 -0800)
committerAlan Coopersmith <alan.coopersmith@oracle.com>
Wed, 6 Feb 2013 02:35:03 +0000 (18:35 -0800)
commit73974dd7ea9ca4d4cdd5464cb813088a6ee9770b
tree64dfbe19b7ee2d8e077f8c6cd8fe6d9eff10bd02
parentb1129a1f1771c9d1653cc15aae94a614f081638a
Avoid memory leak in ddc resort() if find_header() fails

Call find_header first, returning on failure before calling malloc.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
hw/xfree86/ddc/ddc.c