diff options
author | Tom St Denis <tom.stdenis@amd.com> | 2015-11-11 15:48:51 +0900 |
---|---|---|
committer | Michel Dänzer <michel@daenzer.net> | 2015-11-12 11:27:10 +0900 |
commit | 789d7d6a04cca6b36fb088a074027807ccb8dd61 (patch) | |
tree | b521a795b3e6e8d0eabb544d437207d37edc951a | |
parent | d88fa0dd5d37604de8efb05853738cfaca6a3166 (diff) |
Clean up allocation in RADEONInitVideo()
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>
(ported from amdgpu commit db3bb2061b9ac16b0922d9afae99874820356a04)
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
-rw-r--r-- | src/radeon_video.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/radeon_video.c b/src/radeon_video.c index 7abc2f66..48b06e26 100644 --- a/src/radeon_video.c +++ b/src/radeon_video.c @@ -145,7 +145,7 @@ void RADEONInitVideo(ScreenPtr pScreen) return; num_adaptors = xf86XVListGenericAdaptors(pScrn, &adaptors); - newAdaptors = malloc((num_adaptors + 2) * sizeof(XF86VideoAdaptorPtr *)); + newAdaptors = malloc((num_adaptors + 2) * sizeof(*newAdaptors)); if (newAdaptors == NULL) return; |