diff options
author | Eric Engestrom <eric.engestrom@intel.com> | 2018-12-11 12:05:40 +0000 |
---|---|---|
committer | Rob Clark <robdclark@gmail.com> | 2019-01-23 23:16:24 +0000 |
commit | 572b93d7080f1c089b8c236ad0bc932859e2712d (patch) | |
tree | 557b8259ffd1b19efb55601256685e4990696a24 /drm-atomic.c | |
parent | d8da3dcfdfe33ee525cf562e928a5266ac69843c (diff) | |
download | kmscube-572b93d7080f1c089b8c236ad0bc932859e2712d.tar.gz |
drm-atomic: fix allocation size
`props_info` happens to be of type `drmModePropertyRes **` so
`sizeof(props_info) == sizeof(*props_info)`, so we didn't notice, but
the compiler did.
Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Diffstat (limited to 'drm-atomic.c')
-rw-r--r-- | drm-atomic.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drm-atomic.c b/drm-atomic.c index 82531d3..393bf7a 100644 --- a/drm-atomic.c +++ b/drm-atomic.c @@ -391,7 +391,7 @@ const struct drm * init_drm_atomic(const char *device) return NULL; \ } \ drm.type->props_info = calloc(drm.type->props->count_props, \ - sizeof(drm.type->props_info)); \ + sizeof(*drm.type->props_info)); \ for (i = 0; i < drm.type->props->count_props; i++) { \ drm.type->props_info[i] = drmModeGetProperty(drm.fd, \ drm.type->props->props[i]); \ |