glib-aux: fix nm_ref_string_equal_str()

Fix comparison with a NULL string.

The only current caller is nm-supplicant-interface.c, and this bug
causes a missing cleanup of the CurrentBSS property on disconnect.

Fixes: ac8c3a7111 ('glib-aux: improve nm_ref_string_equals_str() to work for non-C-strings')

https://bugzilla.redhat.com/show_bug.cgi?id=1983735
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1073
This commit is contained in:
Beniamino Galvani 2022-01-27 05:05:40 +01:00
parent 7895a9d7e2
commit b755539aa6

View file

@ -131,7 +131,7 @@ static inline gboolean
nm_ref_string_equal_str(NMRefString *rstr, const char *str)
{
if (!str)
return (!!rstr);
return !rstr;
if (!rstr)
return FALSE;