Message ID | 20231119170714.775270-13-gerickson@nuovations.com (mailing list archive) |
---|---|
State | Not Applicable, archived |
Headers | show |
Series | Address Redundant IPv4 Reachability Checks | expand |
diff --git a/gweb/gweb.c b/gweb/gweb.c index 0270531a982f..7a25fe4c8cc3 100644 --- a/gweb/gweb.c +++ b/gweb/gweb.c @@ -414,6 +414,9 @@ GWeb *g_web_ref(GWeb *web) if (!web) return NULL; + debug(web, "ref %d", + web->ref_count + 1); + __sync_fetch_and_add(&web->ref_count, 1); return web; @@ -424,6 +427,9 @@ void g_web_unref(GWeb *web) if (!web) return; + debug(web, "ref %d", + web->ref_count - 1); + if (__sync_fetch_and_sub(&web->ref_count, 1) != 1) return;