summaryrefslogtreecommitdiff
path: root/src/sna/sna_video.c
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/sna/sna_video.c
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/sna/sna_video.c')
-rw-r--r--src/sna/sna_video.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/sna/sna_video.c b/src/sna/sna_video.c
index 69995489..08b848b3 100644
--- a/src/sna/sna_video.c
+++ b/src/sna/sna_video.c
@@ -538,6 +538,7 @@ void sna_video_init(struct sna *sna, ScreenPtr screen)
if (!xf86LoaderCheckSymbol("xf86XVListGenericAdaptors"))
return;
+ adaptors = NULL;
num_adaptors = xf86XVListGenericAdaptors(sna->scrn, &adaptors);
newAdaptors = realloc(adaptors,
(num_adaptors + 2) * sizeof(XF86VideoAdaptorPtr));