]> git.meshlink.io Git - catta/commitdiff
Allow calls to DNSServiceRefDeallocate() with NULL passed
authorLennart Poettering <lennart@poettering.net>
Sun, 23 Oct 2005 15:43:44 +0000 (15:43 +0000)
committerLennart Poettering <lennart@poettering.net>
Sun, 23 Oct 2005 15:43:44 +0000 (15:43 +0000)
git-svn-id: file:///home/lennart/svn/public/avahi/trunk@842 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe

avahi-compat-libdns_sd/compat.c

index 15166d4ccba11efb0e3818fd78a47d544e11095b..cc9ca1cf7d85e99855d69c2a5dd71fae6c68c6e2 100644 (file)
@@ -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(