shift-shell/quicksettings/flashlight/kauth
Marco Allegretti 0d230c5397 Fix dangling pointers and missing null check in flashlight helper
The two const char* variables were pointing into QByteArray
temporaries that were destroyed at the end of each declaration
statement. By the time they were passed to udev, the memory was
freed. Hold the QByteArrays in named locals so the data stays
alive for the duration of the function.

udev_device_new_from_syspath returns NULL if the syspath is
invalid or the device disappears between enumeration and the
privileged call. Add an early-return guard so the subsequent
udev_device_set_sysattr_value call is never reached with a null
device pointer.

Also drop the unnecessary const_cast: udev_device_set_sysattr_value
takes const char*, not char*.
2026-04-18 19:41:04 +02:00
..
CMakeLists.txt Fix KF6Auth find_package order in kauth helpers 2026-04-18 19:05:11 +02:00
flashlighthelper.actions SVN_SILENT made messages (.desktop file) - always resolve ours 2026-03-14 01:39:39 +00:00
flashlighthelper.cpp Fix dangling pointers and missing null check in flashlight helper 2026-04-18 19:41:04 +02:00