]> git.meshlink.io Git - catta/commitdiff
fix segfault when destructing multicast lookup objects
authorLennart Poettering <lennart@poettering.net>
Wed, 21 Jun 2006 23:30:47 +0000 (23:30 +0000)
committerLennart Poettering <lennart@poettering.net>
Wed, 21 Jun 2006 23:30:47 +0000 (23:30 +0000)
git-svn-id: file:///home/lennart/svn/public/avahi/trunk@1225 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe

avahi-core/browse.c

index dd4fe3c214e7c7b589b24dc8e30327deb5072538..16d89548442ac1c3ed8f813f04170314718103c5 100644 (file)
@@ -195,7 +195,6 @@ static void browser_cancel(AvahiSRecordBrowser *b) {
     }
 }
 
-
 static void lookup_wide_area_callback(
     AvahiWideAreaLookupEngine *e,
     AvahiBrowserEvent event,
@@ -208,6 +207,7 @@ static void lookup_wide_area_callback(
 
     assert(e);
     assert(l);
+    assert(l->ref >= 1);
 
     b = l->record_browser;
 
@@ -422,6 +422,7 @@ static void lookup_handle_cname(AvahiSRBLookup *l, AvahiIfIndex interface, Avahi
     l->cname_lookups = avahi_rlist_prepend(l->cname_lookups, lookup_ref(n));
 
     lookup_go(n);
+    lookup_unref(n);
 }
 
 static void lookup_drop_cname(AvahiSRBLookup *l, AvahiIfIndex interface, AvahiProtocol protocol, AvahiLookupFlags flags, AvahiRecord *r) {