Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • Kate Kate
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 26
    • Issues 26
    • List
    • Boards
    • Service Desk
    • Milestones
  • Bugzilla
    • Bugzilla
  • Merge requests 7
    • Merge requests 7
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Releases
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • UtilitiesUtilities
  • KateKate
  • Merge requests
  • !372

Fix leaks in KateConfigDialog

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Waqar Ahmed requested to merge work/fix-leaks-in-config into master Apr 25, 2021
  • Overview 6
  • Commits 1
  • Pipelines 0
  • Changes 2

Leak reported by sanitizer. Also, I don't see any good reason to use a pointer here anyways

==208745==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 355 byte(s) in 9 object(s) allocated from:
    #0 0x563e4afa7e19 in malloc (/home/waqar/kde/usr/bin/kate+0x133e19)
    #1 0x7fac84a3d606 in editorconfig_parse (/usr/lib/libeditorconfig.so.0+0x3606)

Direct leak of 256 byte(s) in 1 object(s) allocated from:
    #0 0x563e4afa7e19 in malloc (/home/waqar/kde/usr/bin/kate+0x133e19)
    #1 0x7fac810b0d25  (/usr/lib/libfontconfig.so.1+0x20d25)

Direct leak of 240 byte(s) in 6 object(s) allocated from:
    #0 0x563e4afddc59 in operator new(unsigned long) (/home/waqar/kde/usr/bin/kate+0x169c59)
    #1 0x563e4b1fc334 in KateConfigDialog::addPluginPage(KTextEditor::Plugin*) /home/waqar/kde/src/utilities/kate/kate/kateconfigdialog.cpp:283:36
    #2 0x563e4b1f87f1 in KateConfigDialog::addPluginPages() /home/waqar/kde/src/utilities/kate/kate/kateconfigdialog.cpp:251:13
    #3 0x563e4b1f1507 in KateConfigDialog::KateConfigDialog(KateMainWindow*) /home/waqar/kde/src/utilities/kate/kate/kateconfigdialog.cpp:54:5
    #4 0x563e4b03edf1 in KateMainWindow::showPluginConfigPage(KTextEditor::Plugin*, int) /home/waqar/kde/src/utilities/kate/kate/katemainwindow.cpp:892:33
    #5 0x563e4b0547da in KateMainWindow::slotConfigure() /home/waqar/kde/src/utilities/kate/kate/katemainwindow.cpp:883:5
    #6 0x563e4b186652 in KateMainWindow::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) /home/waqar/kde/build/utilities/kate/kate/kate-lib_autogen/EWIEGA46WW/moc_katemainwindow.cpp:409:22
    #7 0x7fac858e09cf  (/usr/lib/libQt5Core.so.5+0x2ed9cf)
    #8 0x7fac86553f72 in QAction::triggered(bool) (/usr/lib/libQt5Widgets.so.5+0x153f72)

Signed-off-by: Waqar Ahmed waqar.17a@gmail.com

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: work/fix-leaks-in-config