Now that there is more than one path that could end up calling
hostapd_bss_setup_multi_link(), it looks like it was possible to end up
allocating the MLD context twice and that resulted in resource leaks.
Avoid this by explicitly checking that hapd->mld is not set before
trying to determine whether to set it to an existing context or create a
new one.
Signed-off-by: Jouni Malinen <j@w1.fi>
struct hostapd_bss_config *conf;
size_t i;
+ if (hapd->mld)
+ return;
+
conf = hapd->conf;
if (!hapd->iconf || !hapd->iconf->ieee80211be || !conf->mld_ap ||