Version: (using KDE KDE 3.5.0) Installed from: Compiled From Sources Compiler: gcc 3.3.6 OS: Linux In kdebase/kioslave/media/mediamanager/halbackend.cpp, the libhal_get_all_devices() function is used twice. The memory returned by this function needs to be freed with libhal_free_string_array(). The two instances are in HALBackend::~HALBackend() and HALBackend::ListDevices().
SVN commit 551884 by ervin: Avoid to leak devices lists. Thanks for pointing this. BUG: 117623 M +4 -0 halbackend.cpp --- branches/KDE/3.5/kdebase/kioslave/media/mediamanager/halbackend.cpp #551883:551884 @@ -84,6 +84,8 @@ } } + libhal_free_string_array( halDeviceList ); + DBusError error; dbus_error_init(&error); libhal_ctx_shutdown(m_halContext, &error); @@ -173,6 +175,8 @@ for (int i = 0; i < numDevices; i++) AddDevice(halDeviceList[i], false); + libhal_free_string_array( halDeviceList ); + return true; }