diff options
author | Tom St Denis <tom.stdenis@amd.com> | 2015-09-29 13:07:04 -0400 |
---|---|---|
committer | Michel Dänzer <michel@daenzer.net> | 2015-10-05 16:37:15 +0900 |
commit | db3bb2061b9ac16b0922d9afae99874820356a04 (patch) | |
tree | f66160f29f92404727731e1547248e6fe7a05219 | |
parent | 94caf7ac777134b8396aa762a506053179bbb4c6 (diff) |
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 St Denis <tom.stdenis@amd.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
-rw-r--r-- | src/amdgpu_video.c | 2 |
1 files changed, 1 insertions, 1 deletions
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; |