From c87699f32c6c79905a2fd8675cd19f22e1f4b024 Mon Sep 17 00:00:00 2001 From: Austin Yuan Date: Tue, 5 Feb 2013 14:00:15 +0800 Subject: [PATCH] va_x11: fix klockscan issue (details is bellow) File: va_x11.c Function: va_DisplayContextGetDriverName -> va_DRI2GetDriverName -> dri2_util.c:isDRI2Connected Line: 154 -> 84 -> dri2_util.c:184 Code: TRACEBACK va_x11.c:151: driver_name is NULL va_x11.c:154: 'driver_name' is passed to function 'va_DRI2GetDriverName'. dri2_util.c:84: 'driver_name' is passed to function 'isDRI2Connected'. dri2_util.c:184: 'driver_name' is explicitly dereferenced. Signed-off-by: Austin Yuan --- va/x11/va_x11.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/va/x11/va_x11.c b/va/x11/va_x11.c index 2aa579b..dfb9d07 100644 --- a/va/x11/va_x11.c +++ b/va/x11/va_x11.c @@ -150,7 +150,9 @@ static VAStatus va_DisplayContextGetDriverName ( if (driver_name) *driver_name = NULL; - + else + return VA_STATUS_ERROR_UNKNOWN; + vaStatus = va_DRI2GetDriverName(pDisplayContext, driver_name); if (vaStatus != VA_STATUS_SUCCESS) vaStatus = va_DRIGetDriverName(pDisplayContext, driver_name); -- 2.7.4