Close leak of QOCIDateTime object

Noticed while reviewing usage of this type. The code has a whole
TempStorage class to take care of keeping allocated memory live until
we're done with it, explicitly including date-time objects as a
special case, but neglected to use it in one place.

Pick-to: 6.2 5.15
Change-Id: Ic94c56d67dda6dc3ee36a025a2e0149f6b2a1837
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
This commit is contained in:
Edward Welbourne 2021-11-29 13:41:09 +01:00
parent 4ef8e9427c
commit 24e4370414

View File

@ -1497,6 +1497,7 @@ bool QOCICols::execBatch(QOCIResultPrivate *d, QVariantList &boundValues, bool a
columns[i].lengths[row] = columns[i].maxLen; columns[i].lengths[row] = columns[i].maxLen;
QOCIDateTime *date = new QOCIDateTime(d->env, d->err, val.toDateTime()); QOCIDateTime *date = new QOCIDateTime(d->env, d->err, val.toDateTime());
*reinterpret_cast<OCIDateTime**>(dataPtr) = date->dateTime; *reinterpret_cast<OCIDateTime**>(dataPtr) = date->dateTime;
tmpStorage.dateTimes.append(date);
break; break;
} }
case QMetaType::Int: case QMetaType::Int: