]> granicus.if.org Git - esp-idf/commitdiff
fix(mdns): fix the exception when remove one of multiple service
authorLiu Han <liuhan@espressif.com>
Sun, 3 Jun 2018 09:29:49 +0000 (17:29 +0800)
committerLiu Han <liuhan@espressif.com>
Sun, 3 Jun 2018 09:29:49 +0000 (17:29 +0800)
components/mdns/mdns.c

index 8ead7c44d5dce4551c1287606c8e1ec0b661307e..6b74f7de881c1e5c25f843f591b56c71c2dd1f94 100644 (file)
@@ -3703,7 +3703,7 @@ static void _mdns_execute_action(mdns_action_t * action)
                 a = a->next;
             }
             if (a->next == action->data.srv_del.service) {
-                mdns_srv_item_t * b = a;
+                mdns_srv_item_t * b = a->next;
                 a->next = a->next->next;
                 _mdns_send_bye(&b, 1, false);
                 _mdns_free_service(b->service);