Files
flatpak/session-helper
Simon McVittie 4111dbadaf session-helper: Don't crash on NameOwnerChanged
There was a typo here: (gpointer *) pid_data should have been
(gpointer *) &pid_data, so that g_hash_table_iter_next() would make
pid_data a pointer to a PidData struct. Instead, the previous
implementation left pid_data set to NULL, leading to a NULL dereference
and segmentation fault whenever a name fell off the bus while a watched
client existed.

Instead of directly inserting the missing "&", I've used a pattern
that avoids needing the cast, in an attempt to make it more obviously
correct.

Signed-off-by: Simon McVittie <smcv@collabora.com>

Closes: #2417
Approved by: matthiasclasen
2018-12-11 15:43:37 +00:00
..