summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBeniamino Galvani <bgalvani@redhat.com>2022-01-27 05:05:40 +0100
committerBeniamino Galvani <bgalvani@redhat.com>2022-01-27 13:47:57 +0100
commitb755539aa6ff56f9b7164db77cc0f9bc979ef984 (patch)
tree9561e8368a328364927918982ff87d5087b5d409
parent7895a9d7e2f239c1be32a0715a8deb670631e999 (diff)
downloadNetworkManager-b755539aa6ff56f9b7164db77cc0f9bc979ef984.tar.gz
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: ac8c3a711148 ('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
-rw-r--r--src/libnm-glib-aux/nm-ref-string.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libnm-glib-aux/nm-ref-string.h b/src/libnm-glib-aux/nm-ref-string.h
index 1d85c00e1a..577786acef 100644
--- a/src/libnm-glib-aux/nm-ref-string.h
+++ b/src/libnm-glib-aux/nm-ref-string.h
@@ -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;