diff --git a/applets/kimpanel/backend/scim/main.cpp b/applets/kimpanel/backend/scim/main.cpp --- a/applets/kimpanel/backend/scim/main.cpp +++ b/applets/kimpanel/backend/scim/main.cpp @@ -1089,9 +1089,6 @@ bool daemon = false; - int new_argc = 0; - char **new_argv = new char * [40]; - String config_name("simple"); String display_name; bool should_resident = true; @@ -1209,23 +1206,6 @@ return -1; } //End of command line parsing. - new_argv [new_argc ++] = argv [0]; - - // Store the rest argvs into new_argv. - for (++i; i < argc && new_argc < 40; ++i) { - new_argv [new_argc ++] = argv [i]; - } - - // Make up DISPLAY env. - if (display_name.length()) { - new_argv [new_argc ++] = strdup("--display"); - new_argv [new_argc ++] = const_cast (display_name.c_str()); - - setenv("DISPLAY", display_name.c_str(), 1); - } - - new_argv [new_argc] = 0; - if (!config_name.length()) { std::cerr << "No Config module is available!\n"; return -1; diff --git a/kcms/hardware/joystick/joydevice.cpp b/kcms/hardware/joystick/joydevice.cpp --- a/kcms/hardware/joystick/joydevice.cpp +++ b/kcms/hardware/joystick/joydevice.cpp @@ -185,14 +185,16 @@ } if (bt < 0) { + delete [] oldCorr; return JoyDevice::ERR_GET_BUTTONS; } descr = name; joyFd = fd; axes = ax; buttons = bt; origCorr = oldCorr; + delete [] oldCorr; //We should be deleting this when it fails and after use. corr = new struct js_corr[axes]; amin = new int[axes]; diff --git a/kcms/kfontinst/apps/Viewer.cpp b/kcms/kfontinst/apps/Viewer.cpp --- a/kcms/kfontinst/apps/Viewer.cpp +++ b/kcms/kfontinst/apps/Viewer.cpp @@ -140,8 +140,10 @@ if (!first) { viewer=new KFI::CViewer; viewer->show(); + delete viewer; } viewer->showUrl(url); + delete viewer; first = false; } } diff --git a/kcms/runners/kcm.cpp b/kcms/runners/kcm.cpp --- a/kcms/runners/kcm.cpp +++ b/kcms/runners/kcm.cpp @@ -82,6 +82,7 @@ Plasma::RunnerManager *manager = new Plasma::RunnerManager(this); manager->reloadConfiguration(); + delete manager; } void SearchConfigModule::load() diff --git a/kcms/standard_actions/standard_actions_module.cpp b/kcms/standard_actions/standard_actions_module.cpp --- a/kcms/standard_actions/standard_actions_module.cpp +++ b/kcms/standard_actions/standard_actions_module.cpp @@ -133,6 +133,8 @@ // Hand the collection to the editor m_editor->addCollection(m_actionCollection, i18n("Standard Shortcuts")); + + delete m_actionCollection; }