bugfix: mdns_service_txt_set() wasn't allocating memory for TXT records

Allocation was happening later, causing possible use of stack variables
of caller function, which could be invalid.

Signed-off-by: Piyush Shah <piyush@espressif.com>


* Original commit: espressif/esp-idf@e5e2702ca3
This commit is contained in:
Piyush Shah
2018-09-11 16:20:00 +05:30
committed by suren-gabrielyan-espressif
parent 67173f6770
commit 0c17121ad7
2 changed files with 20 additions and 18 deletions

View File

@ -364,8 +364,7 @@ typedef struct {
} srv_port;
struct {
mdns_srv_item_t * service;
uint8_t num_items;
mdns_txt_item_t * txt;
mdns_txt_linked_item_t * txt;
} srv_txt_replace;
struct {
mdns_srv_item_t * service;