-
Technical task
-
Resolution: Won't Do
-
P3: Somewhat important
-
None
Coverity complains about the following code sequence:
QDialog dlg(this); // also without parent if (dlg.exec()) { // warning: Free of address of expression (BAD_FREE) ... }
because QDialog::exec() might call
bool deleteOnClose = testAttribute(Qt::WA_DeleteOnClose); // ... if (deleteOnClose) delete this;
WA_DeleteOnClose is never set in the cases that Coverity warns about. It can be, in which case it would be a programming error that Coverity should warn about.
It might be possible to provide a modeling file to train Coverity that this code patternis not problematic. Failing that, we might need to find another way to dismiss those warnings.
Coverity ID 265281 and more.
- mentioned in
-
Page Loading...