QProperty: replace a malloc() + memset() with calloc()

Change-Id: I748387b7012496423fb4f9ee7381a984f985d4d2
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
Aurélien Brooke 2025-01-28 08:25:41 +01:00
parent 41c47fdd19
commit 2ef55de102

View File

@ -2189,8 +2189,7 @@ struct QBindingStoragePrivate
{
Q_ASSERT(!d || newSize > d->size);
size_t allocSize = sizeof(QBindingStorageData) + newSize*sizeof(Pair);
void *nd = malloc(allocSize);
memset(nd, 0, allocSize);
void *nd = calloc(1, allocSize);
QBindingStorageData *newData = new (nd) QBindingStorageData;
newData->size = newSize;
if (!d) {