From: Lennart Poettering Date: Sun, 23 Oct 2005 15:43:44 +0000 (+0000) Subject: Allow calls to DNSServiceRefDeallocate() with NULL passed X-Git-Url: https://git.meshlink.io/?a=commitdiff_plain;h=caa787a5490efb94015ae3f26e79983573997a2d;p=catta Allow calls to DNSServiceRefDeallocate() with NULL passed git-svn-id: file:///home/lennart/svn/public/avahi/trunk@842 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe --- 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(