[Openchrome-devel] Fix XVMC crash on shutdown

Xavier Bachelot xavier
Wed Jun 24 16:55:52 PDT 2009


Daniel Drake wrote:
> ViaCleanupXVMC() causes a segfault during X shutdown on hardware where Xv
> is not supported.
> 
> ViaCleanupXVMC() is always called during shutdown and always expects the
> pointer values in the viaAdaptPtr array to have some meaningful value.
> However, in the non-Xv case, this array will not have been initialized.
> Initialize it to NULL in this situation.
> 
> The other function that uses this array, viaExitVideo(), already does a NULL
> check when working with this array. Add a similar check to ViaCleanupXVMC()
> to avoid the segfault.
> 
Reproduced. I've committed the patch. I guess nobody had seen that yet
as all the chipsets have Xv support.

Thanks,
Xavier





More information about the Openchrome-devel mailing list