diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2019-08-29 13:07:47 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2019-08-29 13:07:47 +0100 |
commit | fdb077d507c91d60dbcbdadd206cfe6495cef4c1 (patch) | |
tree | eae4395d69e10a70645ad37e80028a9e06b714c6 /src/libutil/upstream.c | |
parent | b3713de7cefa87af9ed95d091db497cef63502d0 (diff) | |
download | rspamd-fdb077d507c91d60dbcbdadd206cfe6495cef4c1.tar.gz rspamd-fdb077d507c91d60dbcbdadd206cfe6495cef4c1.zip |
[Minor] Add special assertions to avoid upstreams corruption
Diffstat (limited to 'src/libutil/upstream.c')
-rw-r--r-- | src/libutil/upstream.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/libutil/upstream.c b/src/libutil/upstream.c index 177731038..0637a0ac1 100644 --- a/src/libutil/upstream.c +++ b/src/libutil/upstream.c @@ -450,6 +450,7 @@ rspamd_upstream_revive_cb (struct ev_loop *loop, ev_timer *w, int revents) } RSPAMD_UPSTREAM_UNLOCK (upstream->lock); + g_assert (upstream->ref.refcount > 1); REF_RELEASE (upstream); } @@ -1045,6 +1046,7 @@ rspamd_upstream_restore_cb (gpointer elt, gpointer ls) } /* For revive event */ + g_assert (up->ref.refcount > 1); REF_RELEASE (up); } |