diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libc/net/nsdispatch.c | 2 | ||||
-rw-r--r-- | lib/libc/net/nsparser.y | 5 |
2 files changed, 7 insertions, 0 deletions
diff --git a/lib/libc/net/nsdispatch.c b/lib/libc/net/nsdispatch.c index 0e3c419..ad3f208 100644 --- a/lib/libc/net/nsdispatch.c +++ b/lib/libc/net/nsdispatch.c @@ -412,6 +412,8 @@ static void ns_dbt_free(ns_dbt *dbt) { ns_src_free(&dbt->srclist, dbt->srclistsize); + if (dbt->name) + free((void *)dbt->name); } diff --git a/lib/libc/net/nsparser.y b/lib/libc/net/nsparser.y index 1f0fff1..730458a 100644 --- a/lib/libc/net/nsparser.y +++ b/lib/libc/net/nsparser.y @@ -82,6 +82,9 @@ Lines Entry : NL | Database ':' NL + { + free((char*)curdbt.name); + } | Database ':' Srclist NL { _nsdbtput(&curdbt); @@ -163,6 +166,7 @@ _nsaddsrctomap(elem) syslog(LOG_ERR, "NSSWITCH(nsparser): %s line %d: 'compat' used with sources, other than 'cache'", _PATH_NS_CONF, lineno); + free((void*)elem); return; } } @@ -171,6 +175,7 @@ _nsaddsrctomap(elem) syslog(LOG_ERR, "NSSWITCH(nsparser): %s line %d: duplicate source '%s'", _PATH_NS_CONF, lineno, elem); + free((void*)elem); return; } } |