Code Review
/
src
/
app-framework-binder.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
afb-stub-ws: Safe handling of deconnections
[src/app-framework-binder.git]
/
src
/
afb-evt.c
diff --git
a/src/afb-evt.c
b/src/afb-evt.c
index
ed3e467
..
e06d06e
100644
(file)
--- a/
src/afb-evt.c
+++ b/
src/afb-evt.c
@@
-537,7
+537,7
@@
void afb_evt_listener_unref(struct afb_evt_listener *listener)
struct afb_evt_listener **prv;
struct afb_evtid *evtid;
struct afb_evt_listener **prv;
struct afb_evtid *evtid;
- if (!__atomic_sub_fetch(&listener->refcount, 1, __ATOMIC_RELAXED)) {
+ if (
listener &&
!__atomic_sub_fetch(&listener->refcount, 1, __ATOMIC_RELAXED)) {
/* unlink the listener */
pthread_rwlock_wrlock(&listeners_rwlock);
/* unlink the listener */
pthread_rwlock_wrlock(&listeners_rwlock);