mirror of
https://github.com/cesanta/mongoose.git
synced 2026-10-12 17:13:29 +07:00
NULL out name server field properly
Fixes https://github.com/cesanta/mongoose-os/issues/260 PUBLISHED_FROM=e95076915d52edb2298e3ea386281c277e42c89a
This commit is contained in:
committed by
Cesanta Bot
parent
cf0a969a65
commit
c8416cc17d
@@ -11129,6 +11129,7 @@ int mg_resolve_async_opt(struct mg_mgr *mgr, const char *name, int query,
|
||||
|
||||
void mg_set_nameserver(struct mg_mgr *mgr, const char *nameserver) {
|
||||
MG_FREE((char *) mgr->nameserver);
|
||||
mgr->nameserver = NULL;
|
||||
if (nameserver != NULL) {
|
||||
mgr->nameserver = strdup(nameserver);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user