Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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 <[email protected]> Closes: #2417 Approved by: matthiasclasen
- Loading branch information