summaryrefslogtreecommitdiffstats
path: root/avahi-compat-libdns_sd/compat.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2005-10-23 15:43:44 +0000
committerLennart Poettering <lennart@poettering.net>2005-10-23 15:43:44 +0000
commitcaa787a5490efb94015ae3f26e79983573997a2d (patch)
treee8210a063ec615f1dfabc30b5b9ad7db1fccd31b /avahi-compat-libdns_sd/compat.c
parente559962871b8564afb6199f3b5fe24cd47607745 (diff)
Allow calls to DNSServiceRefDeallocate() with NULL passed
git-svn-id: file:///home/lennart/svn/public/avahi/trunk@842 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe
Diffstat (limited to 'avahi-compat-libdns_sd/compat.c')
-rw-r--r--avahi-compat-libdns_sd/compat.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/avahi-compat-libdns_sd/compat.c b/avahi-compat-libdns_sd/compat.c
index 15166d4..cc9ca1c 100644
--- a/avahi-compat-libdns_sd/compat.c
+++ b/avahi-compat-libdns_sd/compat.c
@@ -452,12 +452,10 @@ finish:
}
void DNSSD_API DNSServiceRefDeallocate(DNSServiceRef sdref) {
- assert(sdref);
- assert(sdref->n_ref >= 1);
-
AVAHI_WARN_LINKAGE;
- sdref_unref(sdref);
+ if (sdref)
+ sdref_unref(sdref);
}
static void service_browser_callback(