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 @@ -1090,7 +1090,7 @@ bool daemon = false; int new_argc = 0; - char **new_argv = new char * [40]; + char **new_argv = new char * [40]; //Memory Leak String config_name("simple"); String display_name; @@ -1225,6 +1225,7 @@ } new_argv [new_argc] = 0; + delete[] new_argv; if (!config_name.length()) { std::cerr << "No Config module is available!\n"; 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()