Message ID | 20231116010259.628527-13-gerickson@nuovations.com (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
Series | Address Redundant IPv4 Reachability Checks | expand |
diff --git a/gweb/gweb.c b/gweb/gweb.c index 1cf830a46773..994c33638e55 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;