Commit db3bb206 authored by Tom Denis's avatar Tom Denis Committed by Michel Dänzer
Browse files

Clean up allocation in AMDGPUInitVideo()



The allocation of the adapters should use the correct sizeof (even if
allocating an array of pointers).
Signed-off-by: Tom Denis's avatarTom St Denis <tom.stdenis@amd.com>
Reviewed-by: Michel Dänzer's avatarMichel Dänzer <michel.daenzer@amd.com>
parent 94caf7ac
......@@ -136,7 +136,7 @@ void AMDGPUInitVideo(ScreenPtr pScreen)
num_adaptors = xf86XVListGenericAdaptors(pScrn, &adaptors);
newAdaptors =
malloc((num_adaptors + 2) * sizeof(XF86VideoAdaptorPtr *));
malloc((num_adaptors + 2) * sizeof(*newAdaptors));
if (newAdaptors == NULL)
return;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment