Revert "randr: RRCreateProviderProperty(): use calloc()"

This reverts commit 05188ccec1.

Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2012>
This commit is contained in:
Alan Coopersmith 2025-06-11 13:41:53 -07:00
parent e77b465eb6
commit 9f2b9adbe3

View File

@ -107,10 +107,16 @@ RRCreateProviderProperty(Atom property)
{
RRPropertyPtr prop;
prop = (RRPropertyPtr) calloc(1, sizeof(RRPropertyRec));
prop = (RRPropertyPtr) malloc(sizeof(RRPropertyRec));
if (!prop)
return NULL;
prop->next = NULL;
prop->propertyName = property;
prop->is_pending = FALSE;
prop->range = FALSE;
prop->immutable = FALSE;
prop->num_valid = 0;
prop->valid_values = NULL;
RRInitProviderPropertyValue(&prop->current);
RRInitProviderPropertyValue(&prop->pending);
return prop;