From db3bb2061b9ac16b0922d9afae99874820356a04 Mon Sep 17 00:00:00 2001 From: Tom St Denis Date: Tue, 29 Sep 2015 13:07:04 -0400 Subject: Clean up allocation in AMDGPUInitVideo() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The allocation of the adapters should use the correct sizeof (even if allocating an array of pointers). Signed-off-by: Tom St Denis Reviewed-by: Michel Dänzer --- src/amdgpu_video.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/amdgpu_video.c b/src/amdgpu_video.c index 74e7c84..af34e10 100644 --- a/src/amdgpu_video.c +++ b/src/amdgpu_video.c @@ -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; -- cgit v1.2.3