From: Lennart Poettering Date: Mon, 22 Aug 2005 21:57:09 +0000 (+0000) Subject: fix memory corruption in avahi-test X-Git-Url: https://git.meshlink.io/?a=commitdiff_plain;h=fa87e585fd3247969939bdca8f068ce1c2ec22c4;p=catta fix memory corruption in avahi-test git-svn-id: file:///home/lennart/svn/public/avahi/trunk@398 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe --- diff --git a/avahi-core/avahi-test.c b/avahi-core/avahi-test.c index 7f58676..db0d685 100644 --- a/avahi-core/avahi-test.c +++ b/avahi-core/avahi-test.c @@ -261,7 +261,7 @@ int main(int argc, char *argv[]) { poll_api->timeout_new(poll_api, &tv, dump_timeout_callback, server); avahi_elapse_time(&tv, 1000*60, 0); - poll_api->timeout_new(poll_api, &tv, quit_timeout_callback, server); + poll_api->timeout_new(poll_api, &tv, quit_timeout_callback, simple_poll); for (;;) if (avahi_simple_poll_iterate(simple_poll, -1) != 0) diff --git a/avahi-core/hashmap.c b/avahi-core/hashmap.c index 24df1f2..4d2fa3c 100644 --- a/avahi-core/hashmap.c +++ b/avahi-core/hashmap.c @@ -69,6 +69,7 @@ static Entry* entry_get(AvahiHashmap *m, const void *key) { static void entry_free(AvahiHashmap *m, Entry *e, int stolen) { unsigned idx; + assert(m); assert(e); idx = m->hash_func(e->key) % HASH_MAP_SIZE; diff --git a/avahi-core/server.c b/avahi-core/server.c index 3821a27..4c55edb 100644 --- a/avahi-core/server.c +++ b/avahi-core/server.c @@ -267,7 +267,6 @@ static void incoming_probe(AvahiServer *s, AvahiRecord *record, AvahiInterface * } } - if (!ours) { if (won)