summaryrefslogtreecommitdiffstats
path: root/avahi-core/resolve-host-name.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2005-06-17 14:07:31 +0000
committerLennart Poettering <lennart@poettering.net>2005-06-17 14:07:31 +0000
commit38cce0e6032f760ca98228907b9d7c6068269aeb (patch)
tree7766930fc68340820715b163f11385ddfdc9a9e0 /avahi-core/resolve-host-name.c
parent2d8306950f20e3341ddd66adfdd5feceee3660e5 (diff)
* make sure to free some more time events
git-svn-id: file:///home/lennart/svn/public/avahi/trunk@124 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe
Diffstat (limited to 'avahi-core/resolve-host-name.c')
-rw-r--r--avahi-core/resolve-host-name.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/avahi-core/resolve-host-name.c b/avahi-core/resolve-host-name.c
index 2cfd435..c10119a 100644
--- a/avahi-core/resolve-host-name.c
+++ b/avahi-core/resolve-host-name.c
@@ -55,9 +55,11 @@ static void finish(AvahiHostNameResolver *r, gint interface, guchar protocol, Av
avahi_record_browser_free(r->record_browser_aaaa);
r->record_browser_aaaa = NULL;
}
-
- avahi_time_event_queue_remove(r->server->time_event_queue, r->time_event);
- r->time_event = NULL;
+
+ if (r->time_event) {
+ avahi_time_event_queue_remove(r->server->time_event_queue, r->time_event);
+ r->time_event = NULL;
+ }
if (record) {
switch (record->key->type) {
@@ -148,8 +150,12 @@ void avahi_host_name_resolver_free(AvahiHostNameResolver *r) {
if (r->record_browser_a)
avahi_record_browser_free(r->record_browser_a);
+
if (r->record_browser_aaaa)
avahi_record_browser_free(r->record_browser_aaaa);
+
+ if (r->time_event)
+ avahi_time_event_queue_remove(r->server->time_event_queue, r->time_event);
g_free(r->host_name);
g_free(r);