Skip to content

Coverity issues since 28.02.2022

  • commit 1: add a virtual destructor and free the memory for ::Private for KoSvgPaste
  • commit 2: fix issue with QDebug custom function returning a reference to an object created inside the function
  • commit 3: free the memory before exiting the function that allocated it (since no one will have a pointer because it was an early exit caused by an error)
  • commit 4: initialize the m_page variable to 0, and add a recoverable assert in case it won't be created in the constructor (without it, it was theoretically possible to write to memory that didn't belong to that part of code)
  • commit 5: initialize values in class KisSprayOptionProperties already in class definition (Coverity doesn't see the implementation for readOptionSettingImpl() so it assumes the members to be not initialized - I marked it as False positives but I think initializing values is a good idea anyway so I added a fix too)
  • commit 6: initialize values in class KisGridOpProperties already in class definition (like above)
  • commit 7: initialize values in KisCurveOptionProperties (like above)
  • commit 8: initialize values in KisDuplicateOp (like above)
  • commit 9: change ::Private c-style pointer into a QScopedPointer in Recorder Export (both RecorderExport::Private itself and the UI class)
  • commit 10: as above, but for RecorderDockerDock::Private
  • commit 11: free memory of ColorConverter
  • commit 12: initialize values in KisSizeBrushOption and DeformOption in /deform/ paintop (like above)

Stats

Commit no. Issues count
1 1
2 1
3 1
4 1
5 8
6 6
7 6
8 3
9 1
10 1
11 1
12 2
Sum 32

Test Plan

  • run all tests before and after the MR

Formalities Checklist

  • I confirmed this builds.
  • I confirmed Krita ran and the relevant functions work.
  • I tested the relevant unit tests and can confirm they are not broken. (If not possible, don't hesitate to ask for help!)
  • I made sure my commits build individually and have good descriptions as per KDE guidelines.
  • I made sure my code conforms to the standards set in the HACKING file.
  • I can confirm the code is licensed and attributed appropriately, and that unattributed code is mine, as per KDE Licensing Policy.
Edited by Agata Cacko

Merge request reports