summaryrefslogtreecommitdiffstats
path: root/avahi-core/resolve-service.c
diff options
context:
space:
mode:
Diffstat (limited to 'avahi-core/resolve-service.c')
-rw-r--r--avahi-core/resolve-service.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/avahi-core/resolve-service.c b/avahi-core/resolve-service.c
index 173c34b..6dbca40 100644
--- a/avahi-core/resolve-service.c
+++ b/avahi-core/resolve-service.c
@@ -157,8 +157,16 @@ static void record_browser_callback(AvahiSRecordBrowser*rr, AvahiIfIndex interfa
if (!r->srv_record) {
r->srv_record = avahi_record_ref(record);
changed = 1;
-
- assert(!r->record_browser_a && !r->record_browser_aaaa);
+
+ if (r->record_browser_a) {
+ avahi_s_record_browser_free(r->record_browser_a);
+ r->record_browser_a = NULL;
+ }
+
+ if (r->record_browser_aaaa) {
+ avahi_s_record_browser_free(r->record_browser_aaaa);
+ r->record_browser_aaaa = NULL;
+ }
if (r->address_protocol == AVAHI_PROTO_INET || r->address_protocol == AVAHI_PROTO_UNSPEC) {
AvahiKey *k = avahi_key_new(r->srv_record->data.srv.name, AVAHI_DNS_CLASS_IN, AVAHI_DNS_TYPE_A);