aboutsummaryrefslogtreecommitdiffstats
path: root/libgamma_dummy_site_initialise.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--libgamma_dummy_site_initialise.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libgamma_dummy_site_initialise.c b/libgamma_dummy_site_initialise.c
index 1eb617e..ae79ccc 100644
--- a/libgamma_dummy_site_initialise.c
+++ b/libgamma_dummy_site_initialise.c
@@ -45,6 +45,10 @@ libgamma_dummy_site_initialise(struct libgamma_site_state *restrict this, char *
if (!libgamma_dummy_internal_configurations.capabilities.multiple_crtcs)
crtcs = !!crtcs;
+ if (data->partition_count * sizeof(*data->partitions)) {
+ errno = ENOMEM;
+ goto fail;
+ }
data->partitions = malloc(data->partition_count * sizeof(*data->partitions));
if (!data->partitions)
goto fail;