diff options
| author | Michael Biebl <biebl@debian.org> | 2024-02-13 22:24:20 +0100 |
|---|---|---|
| committer | Michael Biebl <biebl@debian.org> | 2024-02-13 22:24:20 +0100 |
| commit | 4e0c152343821d62f79db8f047395cabc3005b8e (patch) | |
| tree | 31f8fbf3be8013dc34844ac720eb71dabbf04075 /src/libnm-glib-aux/nm-ref-string.h | |
| parent | 0260b90a50f9c49eb216249afea08ba3f3b8981f (diff) | |
| parent | 6681f77b757bbc42ce5c8868ee9142b7ebc8c059 (diff) | |
Update upstream source from tag 'upstream/1.45.91'
Update to upstream version '1.45.91' with Debian dir bebf00e416cd984203cf3c98296e0b1f3016c889
Diffstat (limited to 'src/libnm-glib-aux/nm-ref-string.h')
| -rw-r--r-- | src/libnm-glib-aux/nm-ref-string.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/libnm-glib-aux/nm-ref-string.h b/src/libnm-glib-aux/nm-ref-string.h index c7cfe87f..45313b39 100644 --- a/src/libnm-glib-aux/nm-ref-string.h +++ b/src/libnm-glib-aux/nm-ref-string.h @@ -83,7 +83,8 @@ nm_ref_string_unref(NMRefString *rstr) /* fast-path: first try to decrement the ref-count without bringing it * to zero. */ - r = rstr->_ref_count; + r = g_atomic_int_get(&rstr->_ref_count); + if (G_LIKELY(r > 1 && g_atomic_int_compare_and_exchange(&rstr->_ref_count, r, r - 1))) return; |