From: Kristian Høgsberg Date: Wed, 1 Aug 2012 02:18:28 +0000 (-0400) Subject: compositor-drm: Handle incomplete [output] sections without crashing X-Git-Tag: submit/trunk/20120814.155504~120 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8ff691593cf6c28d7900d7a4bc464133e0b1a4bb;p=profile%2Fivi%2Fweston.git compositor-drm: Handle incomplete [output] sections without crashing --- diff --git a/src/compositor-drm.c b/src/compositor-drm.c index 0ab1dad..24e454c 100644 --- a/src/compositor-drm.c +++ b/src/compositor-drm.c @@ -2050,8 +2050,13 @@ output_section_done(void *data) output = malloc(sizeof *output); - if (!output) + if (!output || !output_name || !output_mode) { + free(output_name); + output_name = NULL; + free(output_mode); + output_mode = NULL; return; + } output->config = OUTPUT_CONFIG_INVALID; output->name = output_name;