]> git.meshlink.io Git - catta/commitdiff
fix memory corruption in avahi-test
authorLennart Poettering <lennart@poettering.net>
Mon, 22 Aug 2005 21:57:09 +0000 (21:57 +0000)
committerLennart Poettering <lennart@poettering.net>
Mon, 22 Aug 2005 21:57:09 +0000 (21:57 +0000)
git-svn-id: file:///home/lennart/svn/public/avahi/trunk@398 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe

avahi-core/avahi-test.c
avahi-core/hashmap.c
avahi-core/server.c

index 7f586765bda364fd5c2bb130b4ab828e12fd5f7f..db0d685224131dc39544edf99a0194e9b63e0b65 100644 (file)
@@ -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)
index 24df1f2afa0b790ae576cd764d25933d7f3a315e..4d2fa3cf5d62f57092331b2c472022c2c6f8005b 100644 (file)
@@ -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;
index 3821a270b4e497128df1ca35f7a0e8166adfb677..4c55edb310ff4349ba1b0d5a35f39fec43517c22 100644 (file)
@@ -267,7 +267,6 @@ static void incoming_probe(AvahiServer *s, AvahiRecord *record, AvahiInterface *
         }
     }
 
-
     if (!ours) {
 
         if (won)