Don't allocate zero-sized memory
Triggered by the tests with 0 resolutions
@@ -643,6 +643,7 @@ ratbag_create_profile(struct ratbag_device *device,
profile->refcount = 0;
profile->device = device;
profile->index = index;
+ if (num_resolutions)
profile->resolution.modes = zalloc(num_resolutions *
sizeof(*profile->resolution.modes));
profile->resolution.num_modes = num_resolutions;
