QProperty: replace a malloc() + memset() with calloc()
Change-Id: I748387b7012496423fb4f9ee7381a984f985d4d2 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
parent
41c47fdd19
commit
2ef55de102
@ -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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user