summaryrefslogtreecommitdiff
path: root/src/legacy
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2012-06-19 15:28:43 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2012-06-19 15:28:43 +0100
commit06634604abf15fdd27dd007fcf81595da994146b (patch)
treea316efc23ee9063c76f64cd81f709761eeda5a42 /src/legacy
parent8bfea58dbc634cadc399d3132030c591e086880c (diff)
Initialise adaptors to 0 in case xf86XVListGenericAdaptors does not
Reported-by: Zdenek Kabelac <zkabelac@redhat.com> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/legacy')
-rw-r--r--src/legacy/i810/i810_video.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/legacy/i810/i810_video.c b/src/legacy/i810/i810_video.c
index 440f9f73..56d04a48 100644
--- a/src/legacy/i810/i810_video.c
+++ b/src/legacy/i810/i810_video.c
@@ -155,10 +155,8 @@ static Atom xvBrightness, xvContrast, xvColorKey;
void I810InitVideo(ScreenPtr screen)
{
ScrnInfoPtr pScrn = xf86ScreenToScrn(screen);
- XF86VideoAdaptorPtr *adaptors;
- int num_adaptors;
-
- num_adaptors = xf86XVListGenericAdaptors(pScrn, &adaptors);
+ XF86VideoAdaptorPtr *adaptors = NULL;
+ int num_adaptors = xf86XVListGenericAdaptors(pScrn, &adaptors);
if (pScrn->bitsPerPixel != 8) {
XF86VideoAdaptorPtr newAdaptor;